On Wed, Oct 20, 2004 at 08:18:20PM +0800, Russell J. Wood wrote:
Hello Dilldoers =b
Would the said bug be because the Set-Cookie entity sent from advogato.org is not RFC compliant?
Here is what I received:
Set-Cookie: id=<data>; path=/; Expires=Thursday, 20-Oct-2005 11:57:18 GMT
I'm under the impression the Expires attribute is meant to be as:
Wdy, DD-MM-YYYY HH:MM:SS GMT
Therefore, because the Weekday isn't in an abbreviated form it is being discarded?
Could be... This is my second answer because I made some mistakes... AFAIK, the most current RFC for cookies is RFC-2965, but it doesn't say a word about the Expires format. The previous spec, RFC-2109 says: <q> Netscape's original proposal defined an Expires header that took a date value in a fixed-length variant format in place of Max-Age: Wdy, DD-Mon-YY HH:MM:SS GMT </q> Note that YY is using two chars here, and that not a word is said about 'Wdy'. http://www.danbbs.dk/~erikoest/hello.htm makes a real soup of it all: In 1996 it was: <q> Wdy, DD-Mon-YY HH:MM:SS GMT expires=Wednesday, 09-Nov-99 23:12:40 GMT </q> *Note the example uses a full weekday name. In 1997 it became: <q> The date string is formatted as: Wdy, DD-Mon-YYYY HH:MM:SS GMT This is based on RFC 822, RFC 850, RFC 1036, and RFC 1123, with the variations that the only legal time zone is GMT and the separators between the elements of the date must be dashes. </q> Note the four characters year syntax, and the dashes requirement. As for 'Wdy', RFC-1123 refers to RFC-822 which says day is: <q> day = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" </q> RFC-1036 (USENET) which obsoletes RFC-850 says dates must be acceptable to RFC-822. For instance: Dates: Wdy, DD Mon YY HH:MM:SS TIMEZONE (that's why the dashes and GMT requirements was added). So that's it. It seems there are four legacy but legal formats: Wdy, DD-Mon-YY HH:MM:SS GMT Wdy, DD-Mon-YYYY HH:MM:SS GMT Weekday, DD-Mon-YY HH:MM:SS GMT Weekday, DD-Mon-YYYY HH:MM:SS GMT with the second one being the most "correct". BTW, the site that Kelson pointed to as an example that uses cookies and locks dillo on a CPU hog, uses: Wdy, DD-Mon-YY HH:MM:SS GMT so it's currently ignored. I'm working on it now, and found this interesting fact while testing http://mosquito.wordpress.org/view_all_bug_page.php. AFAIS, we'll have to accept the four date formats... Does anyone know better? Does anyone Wanna' try to find out? Comments out of simpathetic feelings to a maintainer having a hard time through the RFCs? :) -- Cheers Jorge.-