Re: Termination of POST body

Paul Phillips writes:
> Netscape/X and Mosaic/X terminate POST bodies with an extra \r\n.  My 
> server has been reading all data available on the socket, which means 
> that the number of bytes sent to a CGI's stdin is two greater than the 
> supplied content length.
> 
> The spec tells me in section 7.2.2 "... the length of that body may be 
> determined in one of several ways.  If a Content-Length header field is 
> present, its value in bytes represents [the length].  Otherwise, the body 
> length is determined by the Content-Type (for types with an explicit 
> end-of-body delimiter) [...]"
> 
> If content-length is supplied, I can use that; no problem.  If it is not, 
> it appears that the "end-of-body delimiter" is the only mechanism for 
> determining the end of the entity body.  This appears to be \r\n based on 
> these clients' behavior.  Is this so?
>
> Or, do all clients in normal use supply content-length, and this is a 
> non-issue?

  I've never run across a client that didn't send content-length.

-Bill P.

Received on Tuesday, 26 September 1995 08:54:52 UTC