W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2000

More CVS commits

From: <jose.kahan@w3.org>
Date: Tue, 11 Jul 2000 12:30:36 +0200 (MET DST)
Message-Id: <200007111030.MAA05462@tuvalu.inrialpes.fr>
To: www-lib@w3.org
I just commited some bug fixes for libwww under Windows.

***** Async windows event handler + socket shutdown

The first once concerns HTEvtLst.c. The asynchrounous event handler for
Windows was sending an HTEvent_CLOSE when receiving an FD_CLOSE event.
Even if it sounds strange, this was causing problems when detecting a socket
shutdown while talking to an HTTP/1.0 server. In my case, it happened when
trying to make a PUT thru a Squid server.

The problem here is that libwww is expecting an HTEvent_READ even in this
case. Further down the road, it'll detect the socket shutdown while trying
to read from it thru a recv (). This is in fact what happens under linux.

I changed the event handler to send the HTEvent_READ event for FD_CLOSE
and this solved the problem.

This patch may also remove some problems people could have had using POST
in a windows libwww application.

****** HTReader  + socket shutdown

While debugging the above problem, I noticed that the code in
HTReader.c:HTReader_read wasn't taking into account all the error codes
that recv() could send under winsocks, notably the codes related to
socket shutdown. I added the ones that were missing, according to the
winsock doc and added some extra defines in wwwsys.html.

-Jose
Received on Tuesday, 11 July 2000 06:30:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:37 GMT