Skylos wrote:
On Sun, 27 Feb 2005 19:11:03 -0800, Joshua Chamas <[EMAIL PROTECTED]> wrote:
...

Ack, I didn't explain it right. No... its that this...

$Response->Cookies("ccc", "refReferer", $ENV{HTTP_REFERER});
$Response->Cookies("ccc", "Domain", "colorclimax.com");
$Response->Cookies("ccc", "refCode", "d10200");

did not result in what I want - things would happen like, the
refReferer would be there, but the refCode would not be - or vice
versa if I changed the order.  And sometimes the cookie wouldn't seem
to get set at all.


I just tested this script bit...

<%
$Response->Cookies("ccc", "refReferer", "referrer");
$Response->Cookies("ccc", "Domain", "colorclimax.com");
$Response->Cookies("ccc", "refCode", "d10200");
%>

And I get a header like this:

Content-Length: 9
Cache-Control: private
Set-Cookie: session-id=0f6a26f8de83908f97b6c10b9c5efe91; path=/eg/; 
domain=apache-asp.com; secure
Set-Cookie: ccc=refCode=d10200&refReferer=referrer; path=/; 
domain=colorclimax.com';

So it seems to me to be working correctly.

> I assume this function, AddCookieHeader or whatever it is - actually
> has a list of 'special' key attributes, 'Domain', 'Path', 'Expires',
> etc?

Yes.  Everything else is treated as Value data.

Regards,

Josh


I also have a suspicion that it may be related to urlencoding - some
older browsers like safari don't handle non-urlencoded cookies very
well (I fought with this compatibility issue on another project) getting confused about the multiple = signs in there, apparently. I
had to urlencode my cookie strings. So they looked more like this:


Set-Cookie: ccc=refCode%XXd10200%XXrefReferer%XX;
Domain=colorclimax.com; Path=/;


Interesting. This is the first I have heard of this issue, certainly does not seem cookie spec conformant. ; is the delimiter there.


I want to use the API call. This is how its 'supposed to be' in my head. I'm using the ASP object model, I should not depend on internal structures of objects.


OK. The HASH method is documented and will stay. In particular, if one is doing a lot of cookie manipulation, using the HASH methods may seem cleaner for the code and will be faster besides.


This problem seems to have evaporated. They went to the non-sticky configuration again (without telling me), and everything is working... Gah, I hate it when there was a problem and I couldn't figure it. But anyway...


Good news!

Regards,

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to