[9135] in www-talk@info.cern.ch
Re: Termination of POST body
daemon@ATHENA.MIT.EDU (Roy Fielding)
Tue Sep 26 17:33:54 1995
To: Dave Long <dave@navisoft.com>
Cc: Paul Phillips <paulp@cerf.net>, www-talk@w3.org
In-Reply-To: Your message of "Tue, 26 Sep 1995 11:26:23 PDT."
<9509261826.AA06143@navisoft.com>
Date: Tue, 26 Sep 1995 17:31:49 -0400
From: Roy Fielding <fielding@beach.w3.org>
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.
>>
>> [...]
>>
>> Or, do all clients in normal use supply content-length, and this is a
>> non-issue?
The reason they are doing it is because they are performing ass-backwards
tricks in order to compensate for broken CGI scripts that foolishly
use line-buffered input and would otherwise never receive the last line.
>We've only run across one instance where this caused problems, with a
>CGI that wasn't paying attention to content-length. Are there any
>reasons (other than strict compatibility) we should change it?
No. In fact, if you do what Netscape/Mosaic does, you cannot use
persistent connections. Trying to fix script bugs by breaking the
interface protocol is just plain stupid.
....Roy T. Fielding Department of ICS, University of California, Irvine USA
Visiting Scholar, MIT/LCS + World-Wide Web Consortium
(fielding@w3.org) (fielding@ics.uci.edu)