Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Think about Loose Coupling
 
PerlMonks  

Re: Premature end of script

by BorgCopyeditor (Friar)
on Aug 12, 2002 at 21:37 UTC ( [id://189688]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Premature end of script

I don't know whether this matters, but http defines the header as "Content-Type:"

BCE
--Your punctuation skills are insufficient!

Replies are listed 'Best First'.
Re: Re: Premature end of script
by sauoq (Abbot) on Aug 13, 2002 at 01:00 UTC
    I don't know whether this matters, but http defines the header as "Content-Type:"

    It doesn't. Section 4.2, "Message Headers" of rfc2616 states:

    Field names are case-insensitive.

    Although the RFC is mostly consistent in its use of "Content-Type", there is an example under Section 19.2, "Internet Media Type multipart/byteranges" where the capitalization "Content-type" is used three times.

    My own use of that capitalization is a habit. I can trace it back to the examples in the first printing of "the mouse" which was my primary reference when I started writing CGI scripts. That was Way Back When[tm] it was still CGI Programming on the World Wide Web rather than CGI Programming with Perl, authorship wasn't shared, and cgi-lib.pl was still preferred for two reasons: Lincoln hadn't turned his buggy CGI::* modules into a coherent and stable CGI.pm yet and a lot of us were still using perl4.

    As if this answer wasn't long enough, I had a look at the CGI 1.1 Specification draft Revision 03 (expired) too. It uses both capitalizations as well. The BNF seems to indicate that the script is to return a "Content-type" field.

    This answer is long enough now that I might as well turn it into a soap box (for completeness if nothing else.) So, if you think an RFC specifying CGI makes sense, ping Ken Coar about it. The effort pretty much came to a halt after revision 3 of the draft. I did get a response from Ken on the CGI-WG list in early June though, so there might still be hope.

    -sauoq
    "My two cents aren't worth a dime.";
    

      Thanks for the correction, sauoq. I thought it might be case-insensitive, but couldn't find (in my all-too-brief search) the relevant RFC(s). Proof that unofficial sources are not to be trusted. :-/

      BCE
      --You'reYour punctuation skills are insufficient!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://189688]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.