Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Why would you want to print duplicate headers?

by Flame (Deacon)
on Sep 28, 2001 at 01:03 UTC ( #115261=note: print w/replies, xml ) Need Help??


in reply to Why would you want to print duplicate headers?

I have to agree, there is no reason to make it the default. However there are circumstances where one would want to have the ability to print the header more than once. For example, if setting cookies and you don't want to shove them all within the same header statement... I cannot think of any other reaons, and I agree that it should default to HEADERS_ONCE = 1...


"Wierd things happen, get used to it"

Flame ~ Lead Programmer: GMS
http://gms.uoe.org
  • Comment on Re: Why would you want to print duplicate headers?

Replies are listed 'Best First'.
Re: Re: Why would you want to print duplicate headers?
by ajt (Prior) on Sep 28, 2001 at 13:25 UTC
    I assume that bothering to check that CGI hasn't printed the headers already was added as an option recently, I don't think it use to do this.

    It presumably takes a tiny bit more code and hence time to do the check so not checking may make your scripts a fraction faster - though I doubt you'd notice.

    Secondly if for some strange reason you wanted to print headers several times, and you updated your copy of CGI and this was now the default, you'd be unhappy. So I'd guess that Lincon made it an option, and possibly at some point it will become the default. There are other things that CGI.pm does that are better for backwards compatability than actual saftey.

    There are several things you can do to CGI.pm that are wise but not set by default, see Re: CGI::Safe and easy file uploading and Preventing DOS attacks with CGI.pm.

    Finally, as strange as it seems, sometime it's useful to force your headers twice, so you can quickly see what your headers are, well the second set...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2022-10-03 04:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (13 votes). Check out past polls.

    Notices?