Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 61548
Status: resolved
Priority: 0/
Queue: libwww-perl

Owner: Nobody in particular
Requestors: sohgo [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: allow brackets in a proxy URL
Date: Wed, 22 Sep 2010 13:53:01 +0900 (JST)
To: bug-libwww-perl [...]
From: Sohgo Takeuchi <sohgo [...]>
Download (untitled) / with headers
text/plain 667b
Dear libwww maintainer, Thanks for providing us a great perl package, libwww. I have used LWP::UserAgent module with IPv6. When I specify an IPv6 address with *brackets* in proxy function, perl command says "Bad proxy specification 'http://[2001:db8::1]:3128/' at line 8". ------------------------------------------------------- #!/usr/bin/perl use Net::INET6Glue::INET_is_INET6; use LWP::UserAgent; my $ua = new LWP::UserAgent(); $ua->proxy("http", "http://[2001:db8::1]:3128/"); ------------------------------------------------------- To allow brackets in the URL, can you apply a attached patch? Thank you. -- Sohgo Takeuchi
text/x-diff 722b
--- libwww-perl-5.837/lib/LWP/ 2010-09-22 13:49:01.000000000 +0900 +++ libwww-perl-5.837/lib/LWP/ 2010-09-22 13:49:28.000000000 +0900 @@ -914,7 +914,7 @@ my $url = shift; if (defined($url) && length($url)) { Carp::croak("Proxy must be specified as absolute URI; '$url' is not") unless $url =~ /^$URI::scheme_re:/; - Carp::croak("Bad http proxy specification '$url'") if $url =~ /^https?:/ && $url !~ m,^https?://\w,; + Carp::croak("Bad http proxy specification '$url'") if $url =~ /^https?:/ && $url !~ m,^https?://[\w\[],; } $self->{proxy}{$key} = $url; $self->set_my_handler("request_preprepare", \&_need_proxy)

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to