Re: Subtle bug in Lib3w

At 12:22 30/07/1999 +0200, Judin, Victor wrote:

>I've just found a subtle bug in the event handling of Lib3w on the Wintel
>platform: If the peer closes the socket, the AsyncWindowProc in [HTEvtLst.c]
>is called with FD_CLOSE in LOWORD( lParam ) which results in the call of
>HTTPEvent[ HTTP.c] with the HTEventType = HTEvent_CLOSE, which calls
>HTTPCleanup with status HT_LOADED( i.e. 200 OK ), ignoring the real HTTP
>status. I call HTTPCleanup() with http->result instead, and it seems to work
>fine. A better solution would be more elaborate mapping of Winsock events to
>HT events

That's correct - the bug was also reported by Raffaele Sena and it entered
the CVS base some time ago. I don't have the address handy of the fix but
you should be able to find it in the web-cvs repository at

	http://dev.w3.org/

>Another question: how can I determine the response length if I pipeline the
>HTTP1.1 requests( more than 1 outstanding ), and a server( say, a broken one
>) doesn't set Content-Length header ? 

If it doesn't send content-length nor chunked transfer coding, or at a very
minimum a self delimiting mulitpart message then there is no way that
pipelining can work. This is why it is very important in HTTP/1.1 that
servers are careful sending correct content length or use chunked transfer
encoding.

Henrik
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk

Received on Monday, 2 August 1999 02:50:13 UTC