On Sat, 9 Feb 2002, Jock Friedly wrote:

> I am trying to use Perl's LWP to grab the page
> http://www.house.gov/htbin/crsprodget?/ra/RAINDEX. However, I get the
> following message: "Permission denied."
>
> Perhaps this is best explained by describing what happens with Netscape or
> Internet Explorer. If I use my usual Web browser to click from
> http://www.house.gov/markgreen/crs.htm, where this link is found, the page
> is displayed without any problem. However, if I copy the
> http://www.house.gov/htbin/crsprodget?/ra/RAINDEX link into a new browser
> window, I get the Permission Denied message.

The site is checking the HTTP Referer header.  If you set the Referer to
"http://www.house.gov/markgreen/crs.htm";, then it works fine with LWP.
You can set the Referer using the header() method of HTTP::Request.

-- 
Liam Quinn

Reply via email to