Pilho Kim wrote:

> Hi, Costin
>
> If you want to get Content-Length,
> is String.length() valid or not ?
>
> Tomcat dvelopers, containg you, must know this.
>

HTTP/1.1 spec (i.e. RFC 2616), Section 14.13:

    "The Content-Length entity-header field indicates
    the size of the entity-body, in decimal number
    of OCTETs, sent to the recipient or, in the case
    of the HEAD method, the size of the entity-body
    that would have been sent had the request been
    a GET."

In other words, content length is measured in bytes, not characters.  Therefore,
String.length() does not give you the right answer.

>
> Kim.
>

Craig McClanahan


Reply via email to