Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: BESSARABV [...] cpan.org
Cc: ivan [...] bessarabov.ru
AdminCc:

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



CC: ivan [...] bessarabov.ru
Subject: When getting page with LWP 2 dots in url is not working as expected
I'm using LWP to get page content. Sometimes I have the link that has two dots in it. E.g. "http://google.com/analytics/../support/". When I enter this link in address bar in any browser I see the desired page "http://google.com/analytics/support/". But when I try to get that page with LWP I get 404 error, because it does not parse url before sending it to the server. Here is a code showing this problem: {{{ #! /usr/bin/perl use strict; use warnings; use LWP; my $link = 'http://google.com/analytics/../support/'; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => "$link"); my $response = $ua->request($req); $response->content =~ /<title>(.*)<\/title>/; print "$1"; }}}