Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is Safari rejecting this cookie string?



Am 23.07.2007 um 21:10 schrieb Ixkorr Oxkarr <email@hidden>:

The application works correctly with the IE and
Firefox browsers, but it does not work with Safari.
After some debugging on the server, I determined that
Safari is not accepting the following cookie string:

Set-Cookie: session_id=115y8ycazjs4axw6f;
expires=Saturday, 05-Jan-2008; path=/;
domain=mydomain.com

That is, I output this string at the very beginning of
my CGI program, but the next time the Safari browser
connects, it is not showing the session_id variable.

Oddly, the cookie does seem to work with the version
of Safari that is in the iPhone (I tested it from an
Apple Store), but it does not work from any Apple
desktop or notebook systems I tried (even new models).

Can anyone tell me what part of this cookie string is
unacceptable by Safari? If possible, I would like Mac
users to be able to take full advantage of my web
application too!

Not sure if that's it but you might want to check the format of the expiry date. "Saturday, 05-Jan-2008" is not correct according to the spec I believe.


You could try "Sat, 05-Jan-2008 00:00:00 GMT" or "Sat, 05 Jan 2008 00:00:00 GMT" and see if that works.

See: <http://wp.netscape.com/newsref/std/cookie_spec.html>


Here is what a successful Set-Cookie header looks like:

Set-Cookie: language=en; expires=Thu, 02 Aug 2007 19:56:50 GMT; path=/


HTH Mike -- Mike Fischer Softwareentwicklung, EDV-Beratung Schulung, Vertrieb Note: I read this list in digest mode! Send me a private copy for faster responses.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.