-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
64KiB Server request limit #412
Comments
Hmm you might actually be right. Will have a look why this slipped past our tests and how to fixed it in both the code and tests 👍 |
While debugging this it was hard to find out why I got an empty body, may it would sense to set an attribute to the request when the body is truncated? Also it's hard to response/process to a situation without knowing what happend, because in this case the Middleware just truncates the body and you can't response with a proper code error message. |
@HLeithner Thanks for bringing this up. There is indeed a default 64 KiB limit as described in the documentation.
I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍 |
@clue please look again on the linked code lines, there are 2 bugs in React\Http\Server
|
Have you checked my above code snippet? This should be covered by the existing test suite. Note that this requires a
Can you elaborate? This has 100% code coverage, but if you feel a specific case isn't covered adequately, perhaps add an additional test case? 👍 |
Ok I missed the Streaming Middleware but it looks like a shady workaround. I checked the documentation about the But yes you are right the function does what it should. thx |
I understand where you're coming from, but from experience I would argue that this works good enough. If you feel there's any way to improve this, PRs are very much appreciated! 👍
I understand where you're coming from and I think we agree that defaults should be sane. However, the |
I see Limiting can be improved on all layers also looking at #411 Thanks for you time and we will see what the future brings, maybe some more dynamic limiting Middleware which can automatically balance between requests and size and maybe park requests or deny them based on server load. |
Agreed, see also #255 if you're looking for ways to contribute to this project 👍 |
It seems the server has a hardcoded 64KiB limit. This isn't actually a problem because it should be possible to override it at least that's what the comment says at
https://github.com/reactphp/http/blob/master/src/Server.php#L180
But if I read the code correctly it's not possible to override this 64 KiB limit.
Looking at https://github.com/reactphp/http/blob/master/src/Server.php#L335 the limit will never exceed the
MAXUM_BUFFER_SIZE
Do I missed something?
The only way to overcome this limit is to use the streaming interfaces, if this is right then the comment should be changed.
The text was updated successfully, but these errors were encountered: