bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13544: (web http) fails to parse numeric timezones in Date header


From: Daniel Hartwig
Subject: bug#13544: (web http) fails to parse numeric timezones in Date header
Date: Sat, 9 Mar 2013 09:41:46 +0800

On 8 March 2013 06:28, Andy Wingo <address@hidden> wrote:
> On Thu 24 Jan 2013 23:13, address@hidden (Ludovic Courtès) writes:
>
>> scheme@(guile-user)> (use-modules(web client)(web uri))
>> scheme@(guile-user)> (http-get (string->uri "http://www.sqlite.org/";))
>> web/http.scm:768:6: In procedure parse-asctime-date:
>> web/http.scm:768:6: Bad Date header: Thu, 24  Jan 2013 21:53:01 +0000
>
> As you can see here:
>
>   http://pretty-rfc.herokuapp.com/RFC2616#date-time-formats
>
> HTTP doesn't actually support other time zones.  The date header being
> reported by sqlite.org is invalid.

Correct, though ‘+0000’ is the right time zone, just the format is
wrong (according to RFC 2616).  A survey of HTTP sites I performed
last year as research for another header issue in Guile showed
something like 1% of those sites using the numeric timezone format,
contrary to the specification.  This is likely due to false reliance
on RFC 1123 (quoted by Ludo in the original report), which indicates a
preference for numeric timezones that are are indirectly forbidden by
RFC 2616 (which states, timezone must be the string “GMT”)

Interpretting ‘+0000’ timezone is sensible in a robust implementation,
though what to do if a numeric timezone is given other than this?
Convert it to GMT is one option, since the spec. defines that the
header must be in this timezone.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]