On 06/02/07, Scott Cederberg <[EMAIL PROTECTED]> wrote:
On 2/6/07, sebb <[EMAIL PROTECTED]> wrote:
> Probably, assuming that you can enter them in the text box...
>
> It uses String.length() which I think takes multi-byte into account.
>
String.length() returns a number of characters, while the
Content-Length header is expected to specify a number of octets. So
assuming that HttpClient sets the Content-Length header to the value
returned by the getContentLength() method of the RequestEntity, which
it seems to, the Content-Length value will be too small if any
characters are encoded in more than one byte for the transfer.
In other words, getContentLength() should be returning the number of
bytes that will be transferred, which is not necessarily equal to the
number of characters.
Yes, I realised that earlier today, having seen
http://issues.apache.org/bugzilla/show_bug.cgi?id=39827
I'll change it accordingly.
Sorry about the confusion.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]