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

Premature connection closed #2

Open
ekasetiawans opened this issue Feb 28, 2022 · 2 comments
Open

Premature connection closed #2

ekasetiawans opened this issue Feb 28, 2022 · 2 comments

Comments

@ekasetiawans
Copy link

Calling this

await for (final part in req.multipartFormData) {
  // whatever
}

sometimes caused premature connection closed a.k.a Connection was closed before full header received.

To fix that, I using this way

final parts = await req.multipartFormData.toList();
for (final part in parts) {
  // whatever
}
@simolus3
Copy link
Owner

Where do you get the exception, on the client or on the server? Are you behind a reverse proxy? Using the await for syntax will pause the incoming stream while you're handling some part entries, but that shouldn't be a problem in most cases.

@ekasetiawans
Copy link
Author

ekasetiawans commented Feb 28, 2022

@simolus3 I got exception on the client and yes my server application is behind reverse proxy.

@simolus3 simolus3 reopened this Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants