[cl-dwim-devel] wui session handling and localhost
Kambiz Darabi
darabi at m-creations.com
Thu Aug 26 13:45:51 UTC 2010
Hi,
when I point my browser to http://localhost:8080/ after starting the wui
component demo with
(develop-system :hu.dwim.wui)
I get an error 'The page isn't redirecting properly' although I have
enabled cookies.
The reason is that in function decorate-session-cookie, the line
:domain (string+ "." (host-of request-uri))
sets domain to '.localhost' which triggers an error in rfc2109:
13: (ERROR RFC2109::INVALID-COOKIE-PARAMETER) [:EXTERNAL]
14: (RFC2109:COOKIE-STRING "sid" "wcspmwLEvnraTLmvgvSdZYXNdyYmUUizodKXUEhg") [:EXTERNAL]
and cookie-string's doc says:
Domain (a string)
The Domain attribute specifies the domain for which the
cookie is valid. An explicitly specified domain must always start
with a dot. [ed - this implementation requires an explicitly specified domain!]
Modifying decorate-session-cookie to set the cookie domain to nil, if
the uri host doesn't contain a dot, solves the problem.
I pushed the following patch:
Thu Aug 26 15:42:00 CEST 2010 Kambiz Darabi <kambiz.darabi at gmail.com>
* Don't set the cookie's domain if the URI by which the app is called in the browser has no domain
Regards
Kambiz
More information about the cl-dwim-devel
mailing list