Hi Nick,

I have one addition to Roland's comments.

b) Don't call setContentLength, or set it to -1 in a
FilePart object. This should work fine with HTTP/1.1
and chunked encoding, but also with HTTP/1.0 and
no chunked encoding. Since the server does not know
the content length in advance, it has to read until the
end of the stream in no-chunks mode. Connection
re-use is impossible, but after transferring more than
2 gigs I doubt you'll notice the performance impact
of opening a new connection :-)
It might be a violation of HTTP to POST data without
a valid content length, but since you're controlling
the server as well, that shouldn't bother you much.

The HttpClient 2.0 API does not directly support setting content length > 2GB because of the use of an int. This has been fixed in the 3.0 API but it can be done in 2.0 by setting the content-length header manually:


method.setRequestHeader("Content-Length", "Some number bigger than 2GB");

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to