commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andpr...@gmx.net
Subject PutMethod with chunked transfer
Date Wed, 06 Aug 2003 12:17:52 GMT
Hi all,

how is it possible to tell PutMethod to transfer data chunked?

I do

putMethod.setRequestBody(inputStream);
_jakartaHttpClient.executeMethod(putMethod);

In EntityEnclosingMethod.writeRequestBody() it uses ChunkedOutputStream only

if (contentLength == CONTENT_LENGTH_CHUNKED)

However, before that it chooses to buffer the content and don't run chunked,
if in generateRequestBody() requestStream != null. And this isn't null, as I
set the inputStream above before execution. As a consequence, the
contentLength is known, which causes writeRequestBody() not to use the
ChunkedOutputStream.

So what did I miss here?

Another thing is: Can't HttpClient run streamed if I set the requestBody? As
I observed, it chooses to buffer the content if an InputStream is set.

Thanks in advance.

Andreas

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualit├Ątssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post


Mime
View raw message