libwww-perl / WWW-Mechanize

Handy web browsing in a Perl object
https://metacpan.org/pod/WWW::Mechanize
Other
68 stars 53 forks source link

Referer doesn't change if the initial request is redirected #207

Open spazm opened 7 years ago

spazm commented 7 years ago

koterpil...@gmail.com reported on Jan 30, 2012

What steps will reproduce the problem?
1. "get" a link (say A) which redirects to another page (say B).
2. "follow_link" on page B to the page C.

What is the expected output? What do you see instead?

The page C should get B in "Referer" header. Instead, it gets A.

What version of the product are you using? On what operating system?

WWW::Mechanize 1.71
Perl 5.12.4
Ubuntu 11.10

Please provide any additional information below.

A test case using URL shorteners is attached. It should show the Referer as http://preview.tinyurl.com/6435yb (B in the explanation) because that is the page on which the link is clicked, not http://bit.ly/zgSLNp (A in the explanation) which is the original URL.

Details

Imported from Google Code issue 230 via archive