Skip Menu |

This queue is for tickets about the Net-Async-HTTP CPAN distribution.

Report information
The Basics
Id: 71526
Status: resolved
Priority: 0/
Queue: Net-Async-HTTP

People
Owner: Nobody in particular
Requestors: rs [...] 474.at
Cc:
AdminCc:

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



Subject: https:// redirects cause Unrecognised Location error
Hello, When I fetch from a https address and a redirect is returned, it triggers the following message for me: Unrecognised Location: https://metacpan.org/feed/recent From what I can tell, the fix is to turn the regular expression on line 375 in Net/Async/HTTP.pm (do_request / $on_header_redir / return sub) from m{^http://} into m{^https?://}. I have confirmed that this fixes the behavior for me locally. regards, rs
Attached is a patch on how I resolved the issue.
Subject: https.patch
--- Net-Async-HTTP-0.12/lib/Net/Async/HTTP.pm 2011-09-30 10:30:53.000000000 +0000 +++ Net-Async-HTTP-0.12-https/lib/Net/Async/HTTP.pm 2011-10-07 22:13:20.376828239 +0000 @@ -372,7 +372,7 @@ my $location = $response->header( "Location" ); - if( $location =~ m{^http://} ) { + if( $location =~ m{^http(s?)://} ) { # skip } elsif( $location =~ m{^/} ) {
On Fri Oct 07 13:56:28 2011, PHAYLON wrote: Show quoted text
> From what I can tell, the fix is to turn the regular expression on line > 375 in Net/Async/HTTP.pm (do_request / $on_header_redir / return sub) > from m{^http://} into m{^https?://}. I have confirmed that this fixes > the behavior for me locally.
That looks right indeed. Patched in upstream source; will be in next release. -- Paul Evans