Permalink
Browse files

LWP/Protocol/ldap.pm: make sure to set UTF8 charset on output

  • Loading branch information...
1 parent 390e49c commit 7f73182adfd6cd9900ec0a9ce6aaa0642bcb6493 @marschap marschap committed Sep 6, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/LWP/Protocol/ldap.pm
View
@@ -13,7 +13,7 @@ use LWP::MediaTypes ();
require LWP::Protocol;
@ISA = qw(LWP::Protocol);
-$VERSION = "1.18";
+$VERSION = "1.19";
use strict;
eval {
@@ -148,7 +148,7 @@ sub request {
}
$ldif->done;
close($fh);
- $response->header('Content-Type' => 'text/ldif');
+ $response->header('Content-Type' => 'text/ldif; charset=utf-8');
$response->header('Content-Length', length($content));
$response = $self->collect_once($arg, $response, $content)
if ($method ne 'HEAD');
@@ -211,7 +211,7 @@ sub request {
$content .= $index ? sprintf("%s Match%s found",$index, $index>1 ? "es" : "")
: "<b>No Matches found</b>";
$content .= "</body>\n";
- $response->header('Content-Type' => 'text/html');
+ $response->header('Content-Type' => 'text/html; charset=utf-8');
$response->header('Content-Length', length($content));
$response = $self->collect_once($arg, $response, $content)
if ($method ne 'HEAD');

0 comments on commit 7f73182

Please sign in to comment.