- From: Trond Kristiansen <tk@metis.no>
- Date: Fri, 22 Feb 2002 14:27:15 +0100
- To: www-lib@w3.org
- Message-ID: <3C764733.28066C8E@metis.no>
I'm using libwww in a large project uploading and downloading large files from a repository server. I have detected a fatal bug in the buffering used from a PUT call. Win32 platform. What happens is: PUT starts sending the buffer to the socket, but gets a WOULD_BLOCK. The rest of the buffer is kept in an internal buffer and a timer ensures resending later. But at the flush time the whole remaining data is tried sent to the socket in one single send() and the socket reports back WSAENOBUFS 10555 (windows) and the socket dies (or at least stops working). And libww does not report anything to its caller. I have not tried to fix this reporting issue, but I have modified the flush to avoid sending the socket a too large buffer, and at the same time avoid copying the buffer too many times. Attached is both the diff and the modified libwww/Library/src/HTBufWrt.c The cvs numbers are not correct with respect to libwww, but is my own as set when importing libwww into my own cvs-repository. Hopefully somebody can look through my changes, and integrate them with the package? Regards, --Trond Kristiansen, tk@computas.com
Attachments
- application/x-gzip attachment: HTBufWrt.c.gz
- application/x-gzip attachment: HTBufWrt.diff.gz
Received on Friday, 22 February 2002 08:27:48 UTC