Update of /cvsroot/perl-ldap/ldap/lib/Net
In directory sc8-pr-cvs1:/tmp/cvs-serv6648/lib/Net
Modified Files:
LDAP.pm
Log Message:
Fix url host extraction
Index: LDAP.pm
===================================================================
RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pm,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- LDAP.pm 19 May 2003 15:08:05 -0000 1.51
+++ LDAP.pm 19 May 2003 22:28:06 -0000 1.52
@@ -103,7 +103,7 @@
my $scheme = $arg->{scheme} || 'ldap';
(my $h = $uri) =~ s,^(\w+)://,, and $scheme = $1;
my $meth = $obj->can("connect_$scheme") or next;
- $h =~ s,^//([^/]*).*,$1,; # Extract host
+ $h =~ s,/.*,,; # remove path part
$h =~ s/%([A-Fa-f0-9]{2})/chr(hex($1))/eg; # unescape
if (&$meth($obj, $h, $arg)) {
$obj->{net_ldap_uri} = $uri;
|