More CVS commits

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 UTC