Hi

Andreas Probst wrote:
Hi,

I found the solution, when I debugged through the code again:

To run unbuffered, ie. streamed, set requestContentLength to -1 or the real content length. -1 means chunked. If it isn't set by the caller, it's set to -2 by default, which results i running buffered.

The code now looks like:

putMethod.setRequestBody(inputStream);
putMethod.setRequestContentLength(...);
_jakartaHttpClient.executeMethod(putMethod);
[...]

Exactly, but you should use constant definitions and not
hardcoded number values. Use:

putMethod.setRequestContentLength(PutMethod.CONTENT_LENGTH_CHUNKED);

Olli

--og



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



Reply via email to