Skip to content

Commit

Permalink
LWP/Protocol/ldap.pm: make sure to set UTF8 charset on output
Browse files Browse the repository at this point in the history
  • Loading branch information
marschap committed Sep 6, 2012
1 parent 390e49c commit 7f73182
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/LWP/Protocol/ldap.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use LWP::MediaTypes ();
require LWP::Protocol;
@ISA = qw(LWP::Protocol);

$VERSION = "1.18";
$VERSION = "1.19";

use strict;
eval {
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 7f73182

Please sign in to comment.