Project

General

Profile

Actions

Bug #1343

closed

setCookie and deploymentPath

Added by Kurt Roeckx almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
06/30/2012
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Koen Deforche almost 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

Actions #2

Updated by Kurt Roeckx almost 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

Actions #3

Updated by Koen Deforche almost 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

Actions #4

Updated by Kurt Roeckx almost 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".

Actions #5

Updated by Koen Deforche almost 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

Actions #6

Updated by Kurt Roeckx almost 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.

Actions #7

Updated by Koen Deforche almost 12 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF