Re: does HTPostAnchor() have problems POSTing large bodies?

>>>>> Steinar Bang <sb@metis.no>:

> Platform: linux (glibc2, kernel 2.2.14), gcc (egcs-1.1.2), libwww 5.3.1
> Does anyone know if HTPostAnchor() in 5.3.1 have any known problems
> with writing large (>=6MB) message bodies?

> My application can use both PUT and POST to save its XML files.  In
> both cases I stream the XML into an strstream object, and use the
> buffer the strstream creates as an argument to HTAnchor_setData() on
> the anchor used as an argument to HTPutAnchor() and HTPostAnchor().

> The PUT works (to an apache with mod_put).

> The POST get stuck in there somewhere.

This is where it's stuck:
...
Alert Call.. No entry found for opcode 16
Write Socket WOULD BLOCK 6 (offset 2919488)
Uploading... Callback returned 200
LibwwwNotify::writedata(1)  socket: 6
Host Event.. WRITE passed to `http://localhost/metis/repository'
Buffer...... Flushing 0x83c8f20
Write Socket 65824 bytes written to 6
Alert Call.. No entry found for opcode 16
Write Socket 61952 bytes written to 6
Alert Call.. No entry found for opcode 16
Write Socket WOULD BLOCK 6 (offset 3047264)

The way it looks, is that it's waiting for the socket to be able to
receive more data.  The LibwwwNotify::writedata() trace is in my
libwww adapter to the Qt event loop (using QSocketNotifier for the Qt
savvy). 

For some reason the select() call never tells us that the socket is
ready to receive more data.

I'm grasping at straws here: could it be some kind of timing problem?
That the event loop ends up in a deadlock or something?

But if so: why does this happen after successfully writing 3MB (or
something like that) out of 6MB?

And why does PUT work?  How is it different?

[snip!]
> I've also been successful in uploading a 12MB file to this script from
> an HTML form in Netscape 4.5 on Win32 (but _not_ from Netscape 4.61 on
> linux.  I suspect lack of tolerance for LF instead of CRLF in the
> multipart/form-data when parsed by CGI::Lite).

FWIW I was also able to upload the file from an HTML form in a fairly
recent mozilla on linux (the form method was POST, and the enctype
multipart/form-data). 

Received on Tuesday, 6 February 2001 09:13:06 UTC