Question

I am writing a HTTP Proxy in Delphi 6 using Synapse library.

I know that a regular response has the following syntax:

  • A Status-line
  • Zero or more header (General|Response|Entity) fields followed by CRLF
  • An empty line indicating the end of the header fields
  • Optionally a message-body

But 100 Continue is not a regular one, is just a inter-response that tells the client to continue and must be followed by a final regular response.

So, should I expect a body in a 100 Continue response?

Was it helpful?

Solution

No, 1xx status responses must not have a body. See http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-26.html#rfc.section.3.3.p.5:

"The presence of a message body in a response depends on both the request method to which it is responding and the response status code (Section 3.1.2). Responses to the HEAD request method (Section 4.3.2 of [Part2]) never include a message body because the associated response header fields (e.g., Transfer-Encoding, Content-Length, etc.), if present, indicate only what their values would have been if the request method had been GET (Section 4.3.1 of [Part2]). 2xx (Successful) responses to a CONNECT request method (Section 4.3.6 of [Part2]) switch to tunnel mode instead of having a message body. All 1xx (Informational), 204 (No Content), and 304 (Not Modified) responses do not include a message body. All other responses do include a message body, although the body might be of zero length."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top