Re: how to debug 'status 500'

Abraham Ingersoll (abe@honestabe.net)
Mon, 2 Oct 2000 23:35:26 -0700 (PDT)


Now, by accident, I've found that by calling request twice on the same
HTTP::Request object, I can get it to actually fetch the page:

	my $bogus_res = $UA->request($req);
	my $res = $UA->request($req);


Wierd .. 

-aai

On Mon, 2 Oct 2000, Abraham A. Ingersoll wrote:

> 
> Erk, I found LWP::Debug, but I still don't understand why the request
> object is fubar'd --
> 
> LWP::UserAgent::request: ()
> LWP::UserAgent::simple_request: GET http://amazon.com/
> LWP::UserAgent::_need_proxy: Not proxied
> LWP::Protocol::http::request: ()
> LWP::Protocol::http::request: GET / HTTP/1.0
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
> */*
> Accept-Charset: iso-8859-1,*,utf-8
> Accept-Encoding: gzip
> Accept-Language: en
> Host: amazon.com
> User-Agent: foobar/0.05
> 
> LWP::Protocol::http::request: reading response
> LWP::Protocol::http::request: HTTP/1.1 302 Found
> Date: Tue, 03 Oct 2000 00:37:35 GMT
> Server: Stronghold/2.4.2 Apache/1.3.6 C2NetEU/2412 (Unix)
> Location: http://www.amazon.com:80/exec/obidos/subst/home/home.html
> Connection: close
> Content-Type: text/html; charset=iso-8859-1
> 
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>302 Found</TITLE>
> </HEAD><BODY>
> <H1>Found</H1>
> The document has moved <A
> HREF="http://www.amazon.com:80/exec/obidos/subst/home/home.html">here</A>.<P>
> </BODY></HTML>
> LWP::Protocol::http::request: HTTP/1.1 302 Found
> LWP::Protocol::collect: read 237 bytes
> LWP::UserAgent::request: Simple response: Internal Server Error
> 
> why 'Internal Server Error' ??
> 
> --ai
> 
> On Mon, 2 Oct 2000, Abraham Ingersoll wrote:
> 
> > 
> > Hi,
> > 
> > I'm developing a mod_perl app with LWP but whenever I try to get a
> > response object [$res = $UA->request($req);] I get the following error:
> > 
> > "Cannot get http://foor.com (status 500 (in cleanup))" -- 
> > 
> > 	unless ($res->is_success) {
> > 		print "Cannot get $url (status ",
> >                $res->code, " ", $res->message,")\n";
> > 	}
> > 
> > ..no matter what I specify as the request object ($url). This happens 
> > under Apache/1.3.1 & mod_perl/1.24. (But does NOT happen with simple shell
> > scripts on the same machine.)
> > 
> > Can anyone tell me where I've gone wrong, or give me a pointer on how to
> > figure out exactly what's failing? 
> > 
> > Thanks,
> > Abe
> > 
> > 
> > 
> 
>