Skip to content

HTTP request lifecycle #5

@lucacasonato

Description

@lucacasonato
  1. Client sends request headers to the server (h1/h2/h3) -> url, headers, whether a body is present, and req.connection
  2. Client can send a body (optional) (h1/h2/h3)
  • h1 either streaming (transfer-encoding: chunked) or fixed size (content-length)
  • h2/h3 are always streaming, but could have a size indication (content-length)
  1. Server could respond with client hints before the real response (How to send early hints #4)
  2. Server could respond with status code + headers (even before the full client body is at the server, or even has been sent), additionally specify which trailer "headers" you want respond with (Trailer support in the API whatwg/fetch#981)
  3. Server can respond with a body or upgrading the connection to a different protocol (which would have to be advertised through upgrade header).
  4. Server is done sending the response body or the upgraded connection closes.
  5. Respond with trailers that you advertised

1 must happen before 3 and 4, and 6 stops 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions