Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TBrookHTTPUploadsEnumerator weird behaviour under linux (Ubuntu 24.04) #55

Open
DomenicoMammola opened this issue Jun 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@DomenicoMammola
Copy link
Contributor

DomenicoMammola commented Jun 26, 2024

Hello,
I have a microserver built with Brookframework (main branch updated 26-06-2024) and libsagui 3.5.0.
I've tested it under Windows 11 and Ubuntu 24.04 too.

I've used an instance of TBrookHTTPUploadsEnumerator class to retrieve the files uploaded by the client (react web app).

When the user uploads 2 or more files the following cycle works only if the server is under Windows:

upldEn := ARequest.Uploads.GetEnumerator; repeat [code that uses upldEn.Current] until upldEn.MoveNext;

In linux upldEn.MoveNext returns true immediately, so in linux I can't use the enumerator.

I found that this code instead is working fine in linux:

for i := 0 to ARequest.Uploads.Count - 1 do begin if i = 0 then upld := ARequest.Uploads.First else upld := ARequest.Uploads.Next; [code that uses upld] end;

Environment:

OS, compiler and Brook version to reproduce the problem:

  • Windows 11 / XUbuntu 24.04
  • Lazarus 3.2 FPC 3.2.2
  • Brook 5.7.0
  • Sagui 3.5.0 x86_64 windows/linux

Is this a bug or I am doing something wrong?
Thanks in advance and thanks for the beautiful framework,

Domenico

@DomenicoMammola DomenicoMammola added the bug Something isn't working label Jun 26, 2024
@DomenicoMammola DomenicoMammola changed the title TBrookHTTPUploadsEnumerator weird behaviour under linux (Ubuntu 20.04) TBrookHTTPUploadsEnumerator weird behaviour under linux (Ubuntu 24.04) Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant