[guest - Tue Jun 17 11:29:13 2003]:
Show quoted text> The most common browsers use the Referrer header
Sure, Microsoft Internet Explorer, Netscape Navigator and Mozilla do and
that's many browsers.
Show quoted text> and we are trying to mimic them.
That's why I'm using WWW::Mechanize, to mimic browsers.
Show quoted text> Also, some sites [mistakenly] rely on it.
I'm with you: Death to the Referer header. It's just shit.
Show quoted text> It should be
> noted however that some people don't like the Referrer header
I don't like the Referer header (I hate it) but I must cope with it.
Show quoted text> and
> implementation varies: some browsers don't use it
Sure, my home made browser don't use it. But I'm using WWW::Mechanize
to mimic IE/Mozilla
Show quoted text> some only use it
> within the same site/domain, others easily allow their users to
> fake it. So perhaps its use should be made optional.
I'm using WWW::Mechanize to mimic IE/Mozilla. But an option to break
IE/Mozilla behavior is OK as long that's not a default.
Show quoted text> So, when we are using any of the link following or form submitting
> methods we should set the Referrer header.
>
> However, methods such as get() should not set it when they are called
> directly. This may cause a slight complication during
> implementation (as the request object (that we need to set the
> header on) is created within get(), and get() is called from
> follow() and follow_link()).
But I need It since I sometimes do:
my $res = $agent->get('
http://www.host.com/');
if ($res->is_success) {
$res = $agent->get('
http://www.host.com/register/');
and I need to keep the Referer header.
If you need to clear the Referer you should create another session by
creating another WWW::Mechanize agent.