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

http: close the connection after sending a body without declared length #46333

Merged

Commits on Jan 24, 2023

  1. http: close the connection after sending a body without declared length

    Previously, if you removed both content-length and transfer-encoding
    headers, the connection would still be kept-alive by default. This isn't
    helpful, because without those headers, the only way the client knows
    when the body is completed is when the connection closes.
    
    See https://www.rfc-editor.org/rfc/rfc7230#section-3.3.3 for more
    details on this message body handling logic (this is case 7).
    
    This meant that in effect, if you removed both headers every response
    came with a 5 second delay at the end (the default KA timeout) before
    the client could process it. Now, if you remove both headers the
    connection closes automatically immediately, so the client knows that
    it has received the whole message body.
    pimterry committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    5e3c064 View commit details
    Browse the repository at this point in the history