in reply to Size and anatomy of an HTTP response

Now start the confusion: length says: "Returns the length in characters of the value of EXPR." while the camel book states: "Returns the length in bytes of the scalar value val.".

For a string that hasn't been decoded, Perl assumes Latin-1 as the encoding. And in Latin-1, the number of bytes and number of characters is the same.

Now if you took decoded_content, you'd have to be careful, but I don't think that content itself decodes anything