boot4life
boot4life

Reputation: 5324

What rules are there in HTTP regarding the size of the response?

I'm unclear on what rules there are for a server when sending the response:

  1. Is the Content-Length header required? Under what circumstances?
  2. I think the answer to that is no. So how does the client detect when the response is complete without that header? The server could just disconnect, but that does not seem to work with keep-alive and pipelining.
  3. Does HTTP support unbounded responses? Either truly infinite or with a size that is not known when sending headers.

Upvotes: 0

Views: 50

Answers (1)

Julian Reschke
Julian Reschke

Reputation: 42045

The answers are in the HTTP spec, namely RFC 7230, section 3.3.3.

Upvotes: 1

Related Questions