You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by di...@the-ecorp.com on 2001/05/08 13:26:36 UTC

[PATCH] HttpClient: Content gets corrupted using sendData with by te[] or InputStream

Applies against:
jakarta-commons\httpclient\src\java\org\apache\commons\httpclient\methods\Pu
tMethod.java

When you try to send data to the server with as input a byte[] or and
InputStream (is streamed to internal byte[]) then that byte[] is first
converted to a String (normal encoding) and then back to an utf-8 encoded
byte[]. For real binary data this goes horribly wrong.
>From now on just stream the data directly to the server.


Dirk