unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Daniel Hartwig <mandyke@gmail.com>
To: "Aleix Conchillo Flaqué" <aconchillo@gmail.com>
Cc: 14128@debbugs.gnu.org
Subject: bug#14128: web/http.scm: bad-header date check (UTC?)
Date: Wed, 3 Apr 2013 17:47:01 +0800	[thread overview]
Message-ID: <CAN3veRfT0YWD33FsAy6f3jbGKU4v4BD-6rmG24SWgvOmEc=v8w@mail.gmail.com> (raw)
In-Reply-To: <CA+XASoWC+NLAWOK7+-vVNOYSw3LCEkOxVPEUVB=kNsGA6vYGzw@mail.gmail.com>

On 3 April 2013 15:59, Aleix Conchillo Flaqué <aconchillo@gmail.com> wrote:
> Hi,
>
> I was doing a test using gnutls and connecting to twitter api
> services. Example attached.
>
> I successfully passed the TLS/SSL part, but then I got this HTTP bad
> header issue. I am running Guile 2.0.5 from Debian/unstable but
> current stable-2.0 branch also suffers from the safe problem (I
> think).
>
> =============
> 184: 1 [read-header #<input-output: gnutls-session-port 2e94c30>]
>  754: 0 [parse-asctime-date "Wed, 03 Apr 2013 07:29:49 UTC"]
>
> web/http.scm:754:6: In procedure parse-asctime-date:
> web/http.scm:754:6: Throw to key `bad-header' with args `(date "Wed,
> 03 Apr 2013 07:29:49 UTC")'.
> =============
>
> Basically, the problem is that web/http.scm only accepts a GMT suffix
> and the twitter server sends UTC. I think the RFC 822 standard accepts
> UT instead of UTC, so it would be wrong as well.

RFC 2616 _requires_ http date values have a suffix of " GMT", other
time zone values are not valid.  RFC 822 has no relevance.  Some times
you see these “API” or “web services” breaking HTTP spec. in various
ways and claiming “well we are not HTTP just very-HTTP-like” but that
is not useful for people trying to interact.

Turns out there are a few broken http servers around.  2616 recommends
to convert non-GMT date values to GMT where such conversion is
unambiguous, and in Guile we have done this a bit.  Apparently we are
supposed to do this a bit more and accomodate yet another
non-compliant service?

Erk.  What is the point of defining protocols and standards then?





  reply	other threads:[~2013-04-03  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03  7:59 bug#14128: web/http.scm: bad-header date check (UTC?) Aleix Conchillo Flaqué
2013-04-03  9:47 ` Daniel Hartwig [this message]
2013-04-03 10:33   ` Thien-Thi Nguyen
2013-04-03 10:47     ` Daniel Hartwig
     [not found]       ` <874nfnaj71.fsf@zigzag.favinet>
2013-04-04 22:45         ` Daniel Hartwig
2013-04-03 12:34   ` Ludovic Courtès
2013-04-03 14:57     ` Aleix Conchillo Flaqué
2013-04-03 15:02       ` Aleix Conchillo Flaqué
2013-04-04 21:01 ` Andy Wingo
2013-11-19  8:35 ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN3veRfT0YWD33FsAy6f3jbGKU4v4BD-6rmG24SWgvOmEc=v8w@mail.gmail.com' \
    --to=mandyke@gmail.com \
    --cc=14128@debbugs.gnu.org \
    --cc=aconchillo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).