[hunchentoot-devel] Best way to run Hunchentoot on Port 80, Proxy-Module for Hunchentoot

Edi Weitz edi at agharta.de
Mon Oct 19 09:39:46 UTC 2009


On Sun, Oct 18, 2009 at 5:03 AM, Christoph Senjak
<christoph.senjak at googlemail.com> wrote:

> Well, I had to add SCRIPT_FILENAME to the environment-variables that
> are passed to the CGI-Scripts to be able to run php-scripts (it took
> me a day to find this documented - google loves to list php-tutorials
> with no helpful content ...). Now I can run them - sort of. But seems
> like the session-management somehow doesnt work. I also added a line
>
> ("HTTP_COOKIE" . ,(let ((r ""))
>             (dolist (cookie (hunchentoot:cookies-in*))
>               (setf r (concatenate 'string (car cookie) "=" (cdr
> cookie) ";" r)))
>             r))
>
> which adds the environmental-variable HTTP_COOKIE and should be
> correct (I couldnt find out whether the cookies should be separated
> via a semicolon or something else, but seems like semicolon is right,
> nor could I find out whether to encode these cookies somehow before
> putting them i this variable, but seems like none of the cookies I saw
> has any special characters).

There are RFCs where this is documented.  You should either send
multiple cookie headers for multiple cookies or separate them with
commas.  Note that some servers violate the RFCs, though.  See current
discussion on Drakma mailing list.

And, yes, cookie should be encoded as well.  Look at Hunchentoot's source code.

> There seems to be a cookie sent to the
> php-script. When adding a (format t r), I see a string of the form
> sid=<random-sid>. So the php-engine /should/ know about the cookies.
> Still, it doesnt work. Could it be that hunchentoot doesnt list some
> cookies in (hunchentoot:cookies-in*), or removes outgoing cookies?
>
> Or any Ideas what else I have to set?

Can you look (from the PHP side) at ALL the headers recevied.  That
should be the first step in debugging.




More information about the Tbnl-devel mailing list