-
Notifications
You must be signed in to change notification settings - Fork 332
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
Tests: chunked request body #1307
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Andrei,
I set the default value of the chunked_transform
false.
And feel free to remove these lines.
@pytest.mark.skip('not yet')
Hi Zhidao!
Why do we need ASGI spec explicitly states how to handle chunked requests https://asgi.readthedocs.io/en/latest/specs/www.html:
and
Same for WSGI https://peps.python.org/pep-3333/#other-http-features:
|
It's an experimental feature and we wanted to gate it.
As it stands language modules won't see chunked data, Unit will buffer them up and convert the request to |
Even when |
AIUI If If it's In either case language modules will only see |
It doesn't work that way. In the current implementation of #1262, chunked requests are always accepted and served.
No, in case of After asking @hongzhidao about it, he explained that the main reason for having this option is the problem with the current implementation: the decision about de-chunking is made before routing and knowing where the request will be sent (proxy or application). Disabling de-chunking makes the proxy work correctly, while enabling de-chunking makes applications work correctly. So, by setting My current thought is to set |
Well I'm confused because we just had a meeting where it was agreed that language modules (for now anyway) will not see chunked requests. Sending chunked requests to language modules will be completely pointless as they won't know what to do with it, for all I know they may even just crash... |
To me that means setting The only sensible behaviour for defaulting it to |
Hmm, the false setting is also not clear to me.
I changed the logic and will wait for a final decision from the team. |
For now, let's merge to That keeps the new behavior opt-in until we work out all of the kinks with proxy vs application. |
OK, so I think things are as I expected. But just to be clear. When I think that could be more clearly stated in the commit message for Perhaps by extending the second last line to something like
|
e5dbfcf
to
440837d
Compare
Rebased, added tests for the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tests for the #1262.