in reply to Re: Re: Using perl to set headers
in thread Using perl to set headers
I have a print "Content-type: text/html\n\n" statement at the top of my script and I tried just adding the print CP="NOI ADM DEV PSAi COM ..." policyref="/w3c/php.xml";
No, it wouldn't. You've already printed a blank line, so according to the HTTP spec, the headers are over. You need to insert your headers before the blank line that ends the headers.
print "Content-type: text/html CP=\"NOI ADM DEV PSAi COM ...\" policyref=\"/w3c/php.xml\" \n";
Also, I'm not sure about that formatting on those two headers. Shouldn't HTTP headers have colons followed by spaces instead of equal signs? I'm not familiar with the CP and policyref headers, but I was thinking all headers were formatted the same way, like in most internet protocols. If so, it should be more like this...
print "Content-type: text/html CP: NOI ADM DEV PSAi COM ... policyref: /w3c/php.xml \n";
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using perl to set headers
by Hammy (Scribe) on Sep 12, 2003 at 13:29 UTC |