Re: POST forms & Netscape Navigator

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.

> 
> This may seem a stupid set of questions but this is really starting to
> try my patience :)
> 
> Matt
> 
> -----------------------------------------------------------------------
> Matthew Denner                          email:  matt@wdi.co.uk
> Senior Programmer                       tel:    (+44)(0) 1305 871 543
> Abbotsbury Software Ltd                 fax:    (+44)(0) 1305 871 688
> ENGLAND                                 mobile: (+44)(0) 385  795 492
> -----------------------------------------------------------------------

Received on Thursday, 25 July 1996 05:21:12 UTC