-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Better handle explicit chunked encoding responses #15089
Comments
I'm wondering if this is actually a good thing. Whoever sets the header should be considered responsible for implementing it. But that's not possible for the caller because |
This is wrong. The |
Yeah, correct wording must be this:
|
Thanks, good call. I updated the OP.
Yea exactly. Esp given in Athena land I don't expose the |
So I know as per #5004 (comment) that Crystal natively handles chunked responses for you. However in Athena land, I have the two concepts separated into
ATH::Response
andATH::StreamedResponse
to make it more explicit. The latter of which sets up the response withtransfer-encoding: chunked
. HoweverHTTP::Server
doesn't seem to like this in some contexts:Results in:
As a follow up to #10353, I propose that we make two small changes to better support this use case:
content-length
if there is atransfer-encoding
header as per the RFC:@chunked = true
if there is atransfer-encoding: chunked
headerThe diff for this would be something along the lines of:
The text was updated successfully, but these errors were encountered: