On 26/04/14 18:12, John Hughes wrote:
We could just unconditionaly call "utf8::downgrade ($data);"
Interestingly there is code in HTTP::Message that does that, but we're
going from LWP::Protocol::http::request to
LWP::Protocol::https::Socket->syswrite.
This fixes it for me.
--- /usr/share/perl5/LWP/Protocol/http.pm 2010-01-22 22:44:52.000000000
+0100
+++ /usr/local/share/perl/5.10.1/LWP/Protocol/http.pm 2014-04-26
18:45:56.000000000 +0200
@@ -240,6 +240,7 @@
if (ref($content_ref) eq 'CODE') {
my $buf = &$content_ref();
$buf = "" unless defined($buf);
+ utf8::downgrade ($buf);
$buf = sprintf "%x%s%s%s", length($buf), $CRLF, $buf, $CRLF
if $chunked;
substr($buf, 0, 0) = $req_buf if $req_buf
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]