in reply to Re: Sending a cookie header and HTML output
in thread Sending a cookie header and HTML output

Just to clarify:

print header(-cookie => $cookie); ... print header(-type => 'text/html');

Then printing the HTML won't work?

Replies are listed 'Best First'.
Re: Re: Re: Sending a cookie header and HTML output
by zby (Vicar) on Jun 24, 2003 at 14:01 UTC
    It won't. To see why just capture the output of executing the program to a file. The header according to HTTP specification is only the text untill the first blank line (or every character until two consecutive new lines). You'll see that this program would output a blank line between parts of what should be the header.

      Ah yes, hence the two newlines when sending a plain Content-Type header. Thanks for the explanation :)