Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to send and recieve cookies by calling a script through an SSI call, and it will not work.

When I call the script up directly I can set and recieve cookies without any problem , but when I call the script through SSI, the cookies will not work. I don't know if I am just overlooking something fundamental, but any help would be greatly appreciated. Thanks.

Replies are listed 'Best First'.
Re: Cookies from SSI
by chromatic (Archbishop) on Mar 23, 2000 at 01:37 UTC
    I believe SSI calls are executed by the server before the page is sent to the client. If that's the case, with the cookie potentially embedded in the HTML instead of being sent with the header, I'm not surprised.

    Looking at the Everything source code, a cookie is set before the Content-type header is sent. Content-type: text/html always precedes the actual HTML, so anything included in there probably won't be interpreted by the browser.

    If you're still interested in setting cookies and using SSI, I would suggest writing a very small wrapper script that sets the cookie then redirects to the actual page with the SSI.