Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: WWW::Mechanize doesn't respect <base>?

by haj (Vicar)
on Apr 26, 2021 at 10:24 UTC ( [id://11131726]=note: print w/replies, xml ) Need Help??


in reply to WWW::Mechanize doesn't respect <base>?

What's weird in that observation is that url_abs should give the correct link, even if your base element was ignored.

use 5.020; use strict; use URI::URL; my $uri = URI::URL->new('page2','http://domain.com/page'); say "base is", $uri->base, "absolute link is", $uri->abs;

This prints:

base is: http://domain.com/page absolute link is: http://domain.com/page2

As far as I can say, WWW::Mechanize derives absolute URLs in quite the same way.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11131726]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-23 06:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found