Re: Why getprint failed



Wuming Gong wrote:
> Dear list,

This is not a list. It is a Usenet Newsgroup. The difference is
significant.

> I want to wrap this page
> (http://www.dharmacon.com/sidesign/default.aspx?source=0) by perl
> script, using LWP::UserAgent.

1) I don't know what "wrap" is supposed to mean in this context

2) Your code below does not use LWP::UserAgent (at least, not
explicitly)

> However, the LWP cannot get the correct content of this page :
>
> $ perl -MLWP::Simple -e
> 'getprint("http://www.dharmacon.com/sidesign/default.aspx?source=0";)'
> 500 Internal Server Error
> <URL:http://www.dharmacon.com/sidesign/default.aspx?source=0>
>
> But when I open this URL in firefox, the page can display well.

Not for me, it doesn't. I get back an HTTP 500 error, albeit with a
significant amount of debugging information

If you want to get at the content of this HTTP 500 page, you cannot use
LWP::Simple (it's called "Simple" for a reason). Use the full fledged
LWP::UserAgent to examine the LWP::Response content attribute.

Paul Lalli

.



Relevant Pages

  • Re: how to set/get cookie for a raw iocp http server?
    ... wrap it out in its cookie header. ... >> I am using iocp to create a http server. ... You get a cookie when the client includes Cookie: ...
    (microsoft.public.vc.atl)
  • Re: Whats the criteria?
    ... > about how to wrap text to the next line) and it wasnt posted!!!!???? ... Apparently you were trying to post to the Usenet Newsgroup, ... sci.stat.math, using the gateway provided by The Math Forum, ...
    (sci.stat.math)
  • Re: **** is not a valid win32 application...
    ... changing the http to hxxp, my newsreader may allow the URL to wrap. ...
    (alt.comp.anti-virus)