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


In reply to URI::_generic by ghettofinger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.