W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > May to August 2000

RE: problem with responses to post-requests

From: Scott Lawrence <lawrence@agranat.com>
Date: Fri, 25 Aug 2000 07:36:57 -0400
To: <OSeemann@gmx.net>, <http-wg@cuckoo.hpl.hp.com>
Message-ID: <000d01c00e88$c6756f60$954768c0@oyster.agranat.com>
> after processing the content of the post-request i'm sending
> the html-output to the client and close the connection. this
> works fine with NN. but IE doesn't show the page and gives an
> error-msg telling me that the connection has been reset.

> what's the difference between responses to GET and POST
> requests ?

There isn't any.
 
> why is IE telling me errors and not showing the transmitted page ?
 
> if (strcmp(request->method,"POST") == 0)
> {
>  putsock(conn,"HTTP/1.0 200 OK\n");
>  putsock(conn,"Content-Type: text/plain\n\n");
>  putsock(conn,"Netscape Navigator shows this.\
>               Internet Explorer gives error");
> }
> 
> // here NN says "Document Done" and shows the page
> // but IE gives error msg "Connection Reset"
> close(conn); 
> }

Those "\n" should really be "\r\n", but that isn't your problem.

Your TCP is probably (incorrectly) sending an RST when you do the
close.  If the browser hasn't read all of the response, then any
unread part will be discarded and produce the error you are
seeing.  The difference between the browsers could be timing or
differences in the way they do i/o.

If your platform supports it, use shutdown() rather than close().

--
Scott Lawrence         Architect             <lawrence@agranat.com>
Virata             http://www.virata.com/         http://emweb.com/
Received on Friday, 25 August 2000 12:40:40 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:33:38 EDT