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

wsgi: Don't break HTTP framing during 100-continue handling #578

Merged
merged 1 commit into from
Sep 17, 2021

Commits on Sep 13, 2021

  1. wsgi: Don't break HTTP framing during 100-continue handling

    Expect: 100-continue is a funny beast -- the client sends it to indicate
    that it's willing to wait for an early error, but
    
    - the client has no guarantee that the server supports 100 Continue,
    - the server gets no indication of how long the client's willing to wait
      for the go/no-go response, and
    - even if it did, the server has no way of knowing that the response it
      *emitted* within that time was actually *received* within that time
    - so the client may have started sending the body regardless of what the
      server's done.
    
    As a result, the server only has two options when it *does not* send the
    100 Continue response:
    
    - close the socket
    - read and discard the request body
    
    Previously, we did neither of these things; as a result, a request body
    could be interpreted as a new request. Now, close out the connection,
    including sending a `Connection: close` header when practical.
    tipabu committed Sep 13, 2021
    Configuration menu
    Copy the full SHA
    579c498 View commit details
    Browse the repository at this point in the history