projects
/
virtual-ldap
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
we need to unset LANG if we don't want to corrupt encoding
[virtual-ldap]
/
bin
/
ldap-rewrite.pl
diff --git
a/bin/ldap-rewrite.pl
b/bin/ldap-rewrite.pl
index
4e2d55e
..
23e790b
100755
(executable)
--- a/
bin/ldap-rewrite.pl
+++ b/
bin/ldap-rewrite.pl
@@
-131,10
+131,6
@@
sub run_proxy {
die "Could not create listener socket: $!\n" unless $listenersock;
die "Could not create connection to server: $!\n" unless $targetsock;
die "Could not create listener socket: $!\n" unless $listenersock;
die "Could not create connection to server: $!\n" unless $targetsock;
- # mark sockets as binary
- binmode( $listenersock );
- binmode( $targetsock );
-
my $sel = IO::Select->new($listenersock);
my %Handlers;
while (my @ready = $sel->can_read) {
my $sel = IO::Select->new($listenersock);
my %Handlers;
while (my @ready = $sel->can_read) {
@@
-157,6
+153,8
@@
sub run_proxy {
}
}
+$ENV{LANG} = 'C'; # so we don't double-encode utf-8 if LANG is utf-8
+
my $listenersock = IO::Socket::INET->new(
Listen => 5,
Proto => 'tcp',
my $listenersock = IO::Socket::INET->new(
Listen => 5,
Proto => 'tcp',