Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

URI::_generic

by ghettofinger (Monk)
on Feb 13, 2005 at 16:50 UTC ( [id://430588]=perlquestion: print w/replies, xml ) Need Help??

ghettofinger has asked for the wisdom of the Perl Monks concerning the following question:

Wise Monks,

I have a small cgi script that takes input in the form of a URL. Does anyone know why I would be getting the following error sporadicly, only with some input (URL) and not with others?

[Sun Feb 13 16:11:56 2005] [error] [client 1.1.0.218] Premature end of + script headers: /var/www/fd/fd.cgi Can't locate object method "host" via package "URI::_generic" (perhaps + you forgot to load "URI::_generic"?) at /usr/share/perl5/HTTP/Cookie +s.pm line 682.

It happens only sometimes with some input that is given to it. I know that this question has been asked before but I really don't think that I have misformed urls. I can input some and the script runs fine and with others it does not. It usually gives me no problems.

I found the following link: http://www.monkey.org/openbsd/archive/ports/0409/msg00839.html and it talks about patching URI on openbsd. Is there a patch that I can apply? Does it need it? This says it fixes the behavior that I am seeing. I am still very new to perl and modules can be a bit perplexing. Is there a better way to debug what is going on within my script? The output that apache gives me is not super helpful.

I appreciate everyone's help.

Thanks in advance,
ghettofinger

Replies are listed 'Best First'.
Re: URI::_generic
by saintmike (Vicar) on Feb 13, 2005 at 17:12 UTC
    Which version of LWP are you using? Make sure
    perl -MLWP -e'print $LWP::VERSION'
    returns 5.803, which is the latest.
      My version of LWP is old. 5.64. I will update it and see what happens.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://430588]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-23 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found