[9132] in www-talk@info.cern.ch

home help back first fref pref prev next nref lref last post

Re: Termination of POST body

daemon@ATHENA.MIT.EDU (William Perry)
Tue Sep 26 08:55:51 1995

Date: Tue, 26 Sep 95 05:58 PDT
From: wmperry@spry.com (William Perry)
To: Paul Phillips <paulp@cerf.net>
Reply-To: wmperry@spry.com
Cc: www-talk@w3.org
In-Reply-To: <Pine.SUN.3.91.950925193337.22481A-100000@nic.cerf.net>
Resent-From: www-talk@w3.org

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.


home help back first fref pref prev next nref lref last post