You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jean-frederic clere <jf...@fujitsu-siemens.com> on 2002/11/21 15:47:33 UTC
[httpclient] Patch for chunk
Hi,
I have noted that the chunking does not send the end chunk.
Find enclosed a patch for it.
Cheers
Jean-frederic
PS: The examples/PostXML.java should be renamed examples/PostFile.java and
arranged a little. Should I proposed a patch for that too?
Re: [httpclient] Patch for chunk
Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Ortwin Glück wrote:
> Not sure what you are trying to fix here. This patch does *nothing*.
>
> I guess you should rather close your input stream.
Oops that was the wrong patch.txt file.
I am trying to fix the missing last-chunk (The "outstream.write(tmp, 0, 0);"
does it).
Find enclosed the right patch.
>
> Odi
>
>
> jean-frederic clere wrote:
>
>> Index: src/java/org/apache/commons/httpclient/methods/PostMethod.java
>> ===================================================================
>> RCS file:
>> /home/cvs/mirror/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java,v
>>
>> retrieving revision 1.27
>> diff -u -r1.27 PostMethod.java
>> --- src/java/org/apache/commons/httpclient/methods/PostMethod.java
>> 12 Nov 2002 09:58:23 -0000 1.27
>> +++ src/java/org/apache/commons/httpclient/methods/PostMethod.java
>> 21 Nov 2002 13:26:46 -0000
>> @@ -746,6 +746,7 @@
>> outstream.write(tmp, 0, i);
>> total += i;
>> }
>> + outstream.write(tmp, 0, 0);
>> if ((this.requestContentLength > 0) && (total <
>> this.requestContentLength)) {
>> throw new IOException("Unexpected end of input stream
>> after "
>> +total +" bytes (expected "+
>> this.requestContentLength +" bytes)");
>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
Re: [httpclient] Patch for chunk
Posted by Ortwin Glück <or...@nose.ch>.
Not sure what you are trying to fix here. This patch does *nothing*.
I guess you should rather close your input stream.
Odi
jean-frederic clere wrote:
> Index: src/java/org/apache/commons/httpclient/methods/PostMethod.java
> ===================================================================
> RCS file:
> /home/cvs/mirror/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java,v
> retrieving revision 1.27
> diff -u -r1.27 PostMethod.java
> --- src/java/org/apache/commons/httpclient/methods/PostMethod.java 12
> Nov 2002 09:58:23 -0000 1.27
> +++ src/java/org/apache/commons/httpclient/methods/PostMethod.java 21
> Nov 2002 13:26:46 -0000
> @@ -746,6 +746,7 @@
> outstream.write(tmp, 0, i);
> total += i;
> }
> + outstream.write(tmp, 0, 0);
> if ((this.requestContentLength > 0) && (total <
> this.requestContentLength)) {
> throw new IOException("Unexpected end of input stream after "
> +total +" bytes (expected "+
> this.requestContentLength +" bytes)");
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>