Re: POST forms & Netscape Navigator

Addressed to:

** Reply to note from Soren Vejrum <> Thu, 25 Jul 1996 11:22:35 +0200 
> Matthew Denner wrote: 
> >  
> > All, 
> >  
> > I've been working on a HTTPd for about 6 months now and when I started 
> > Netscape Navigator 1.0 worked fine with POST forms.  Now I find that 
> > my POST forms don't work with Navigators 2.0 and above.  I understand 
> > that I get a POST response from the client and I can retrieve the 
> > header information but where does the actual data come from? 
> >  
> > With Navigator 1.0 the data was sent along with the header separated 
> > by at least 2 CRLF's.  Now I just get the header and the server sits 
> > in an infinite loop waiting for the data.  Have Netscape altered the 
> > way their browser works?  Does the data get sent on a different port? 
> > Or does the server have to send a response to the header so that the 
> > data can be sent by the client? 
> Your problem is probably that your server reads data until the 
> connection is closed/blocked by the client as a sign that the full 
> request has been sent. However in never versions of Netscape they have 
> implemented the "Keep-Alive" header for multiple requests over a single 
> tcp/ip connection. 
> Instead of reading until the end of the connection you should find the 
> "Content-Length" header which tells you the size of the POST'ed data. 
> Read this number of bytes after the 2 CRLF's. 
What you should do is read the standard. RFC 1945 has been issued as 
an informational standard for HTTP/1.0 and HTTP/1.1 is in draft standard 
right now. You can get the latest draft standard for 1.1 from Follow the links to the HTTP stuff. 
You do have to read and parse the Content-Length to determine how much data 
to read. Doing the keep-alive is optional if you're doing a HTTP/1.0 
server. It's not part of the "standard" part of RFC 1945. It is the default 
for HTTP/1.1 which means as a server you must always send a valid Content-Length 
when sending an entity body to the client. 
A technical point here also (probably minor and fussy), but the way you 
view the separation between headers and entity body is there is only 
one empty line (CRLF). The first CRLF is attached as the end marker for the 
last header. The separation is then marked by an emtpy line. Whatever comes 
after that is the entity body. 

Paul Hethmon 
Computerman -- Agricultural Policy Analysis Center 
NeoLogic Ftp & Mail Servers 
Knoxville Warp User's: 

Received on Thursday, 25 July 1996 07:58:11 UTC