From 6438c73c6e11a516bfb670397bfc57048ac94c44 Mon Sep 17 00:00:00 2001 From: Marcus Ramberg Date: Sun, 14 Nov 2004 22:13:04 +0000 Subject: [PATCH] Applied length patch for utf8. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@281 48953598-375a-da11-a14b-00016c27c3ee --- lib/Apache/MVC.pm | 2 +- lib/CGI/Maypole.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index 0f91e9a..645c046 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -47,7 +47,7 @@ sub send_output { ? $r->{content_type} . "; charset=" . $r->{document_encoding} : $r->{content_type} ); - $r->{ar}->headers_out->set( "Content-Length" => length $r->{output} ); + $r->{ar}->headers_out->set( "Content-Length" => do { use bytes; length $r->{output} } ); APACHE2 || $r->{ar}->send_http_header; $r->{ar}->print( $r->{output} ); } diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index 345b68e..ddcf222 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -43,7 +43,7 @@ sub send_output { print $r->{cgi}->header( -type => $r->{content_type}, -charset => $r->{document_encoding}, - -content_length => length $r->{output}, + -content_length => do { use bytes; length $r->{output} }, ); print $r->{output}; } -- 2.39.5