Aristotle Pagaltzis wrote:
>     # everything should be bytes at this point, but just in case
>     $response->content_length( bytes::length( $response->body ) );
>
> I was shocked to discover this! Any code that uses bytes::length
> is automatically broken.

Not in this case, the HTTP spec says that the Content-Length header should 
contain the number of octets in the body. If you're sending UTF-8 then this 
is likely different to the number of characters in the string.

 Carl


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to