Skip to content

Commit

Permalink
Item13378: content-length in bytes, not chars
Browse files Browse the repository at this point in the history
  • Loading branch information
Comment committed May 10, 2015
1 parent bc4d838 commit cabf68c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/lib/Foswiki/Response.pm
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ Gets/Sets response body. Note: do not use this method for output, use
sub body {
my ( $this, $body ) = @_;
if ( defined $body ) {
$this->{headers}->{'Content-Length'} = length($body);
use bytes;
my $len = bytes::length($body);
no bytes;
$this->{headers}->{'Content-Length'} = $len;
$this->{body} = $body;
}
return $this->{body};
Expand Down

0 comments on commit cabf68c

Please sign in to comment.