W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2002

Problems with sending large puts on windows.

From: Trond Kristiansen <tk@metis.no>
Date: Fri, 22 Feb 2002 14:27:15 +0100
Message-ID: <3C764733.28066C8E@metis.no>
To: www-lib@w3.org
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



Received on Friday, 22 February 2002 08:27:48 GMT

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