Bug #1343
closedsetCookie and deploymentPath
0%
Description
Hi,
setCookie() defaults to using deploymentPath(). deploymentPath() seems to be returning the name of the executable, and not the directory it is in, so it returns an invalid path for the cookie.
Kurt
Updated by Koen Deforche over 12 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
Hey,
deploymentPath() really is supposed to return the entire path. How do you deploy your application (with what connector, and if using FastCGI with what server ?). For FastCGI applications the server is supposed to give this information to Wt.
Regards,
koen
Updated by Kurt Roeckx over 12 years ago
It returs "/hello.cgi" for me. It should return "/".
I'm using apache (2.2.22) with mod-fcgid 2.3.6.
Kurt
Updated by Koen Deforche over 12 years ago
Hey Kurt,
"/hello.cgi" sounds right if your application is deployed at "/hello.cgi". Only requests that arrive at "/hello.cgi..." should have the cookie ?
Regards,
koen
Updated by Kurt Roeckx over 12 years ago
Koen Deforche wrote:
Hey Kurt,
"/hello.cgi" sounds right if your application is deployed at "/hello.cgi". Only requests that arrive at "/hello.cgi..." should have the cookie ?
That's not what the RFC about cookies says, or how browsers interpret it. It should point to "/", not "/hello.cgi".
Updated by Koen Deforche over 12 years ago
Hey Kurt,
Where do you read that ?
In RFC2965 I read: For two strings that represent paths, P1 and P2, P1 path-matches P2
if P2 is a prefix of P1 (including the case where P1 and P2 string-
compare equal). Thus, the string /tec/waldo path-matches /tec.
So, also /tec patch-matches /tec and thus what Wt does seems correct ?
Regards,
koen
Updated by Kurt Roeckx over 12 years ago
After re-reading things, I'd have to agree that it's correct.
The last RFC is 6265, and it reads:
A request-path path-matches a given cookie-path if at least one of
the following conditions holds:
o The cookie-path and the request-path are identical.
[...]
It's only the default path in case there was cookie path that should be set to "/".
So feel free to close this.
Updated by Koen Deforche over 12 years ago
- Status changed from Feedback to Closed