From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.bugs Subject: bug#14128: web/http.scm: bad-header date check (UTC?) Date: Wed, 3 Apr 2013 17:47:01 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1364982486 21445 80.91.229.3 (3 Apr 2013 09:48:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2013 09:48:06 +0000 (UTC) Cc: 14128@debbugs.gnu.org To: Aleix Conchillo =?UTF-8?Q?Flaqu=C3=A9?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Apr 03 11:48:33 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UNKIy-0006ZH-LK for guile-bugs@m.gmane.org; Wed, 03 Apr 2013 11:48:32 +0200 Original-Received: from localhost ([::1]:55641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNKIZ-0006OT-K0 for guile-bugs@m.gmane.org; Wed, 03 Apr 2013 05:48:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNKIT-0006JK-LX for bug-guile@gnu.org; Wed, 03 Apr 2013 05:48:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNKIS-00056F-I1 for bug-guile@gnu.org; Wed, 03 Apr 2013 05:48:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNKIS-00055y-7C for bug-guile@gnu.org; Wed, 03 Apr 2013 05:48:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UNKLO-000828-ND for bug-guile@gnu.org; Wed, 03 Apr 2013 05:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Hartwig Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 03 Apr 2013 09:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14128 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14128-submit@debbugs.gnu.org id=B14128.136498260930771 (code B ref 14128); Wed, 03 Apr 2013 09:51:02 +0000 Original-Received: (at 14128) by debbugs.gnu.org; 3 Apr 2013 09:50:09 +0000 Original-Received: from localhost ([127.0.0.1]:59365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNKKW-00080F-5f for submit@debbugs.gnu.org; Wed, 03 Apr 2013 05:50:08 -0400 Original-Received: from mail-ie0-f179.google.com ([209.85.223.179]:38982) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNKKT-000804-Jr for 14128@debbugs.gnu.org; Wed, 03 Apr 2013 05:50:06 -0400 Original-Received: by mail-ie0-f179.google.com with SMTP id k11so1456088iea.10 for <14128@debbugs.gnu.org>; Wed, 03 Apr 2013 02:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=ypOeBLT6SqhZVZsGXxNyZaog6wEwZpN0wflRV6ygfgw=; b=rJOcZ5I9ruM1GZkKeLwTVTCpgmquW6nHo/v0B0+YAzoorFwxlZmRn++Fn88KDXhmSJ 86dosV6zbwEGx9myJ/b0HUE5/f7J9nnK8S6T9FzMi0jHJTuioTmIlb5sDeqPWz6iRvOH mDmJi1ETRQrbSO9o0CF99IoLMhW1QQ4iaEBTKzvus0pSDzUki+wj28APTGyOpChI9b0k i7e5Php4/A8Qnvoiq4Fe/zPBVEqTXu8Cd7cpHtVeDd3TJaOMnS6Z1clLjzyQnNyBH12B 7UR5T+oXyg4dnh1NLyFBKb7937TSfj2jg/FdpLFauLsDhR+GDas9M4YzfN2BWvmFMNns BjXA== X-Received: by 10.42.82.67 with SMTP id c3mr511289icl.25.1364982421564; Wed, 03 Apr 2013 02:47:01 -0700 (PDT) Original-Received: by 10.64.26.168 with HTTP; Wed, 3 Apr 2013 02:47:01 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7055 Archived-At: On 3 April 2013 15:59, Aleix Conchillo Flaqu=C3=A9 w= rote: > 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). > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 184: 1 [read-header #] > 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")'. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 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 =E2=80=9CAPI=E2=80=9D or =E2=80=9Cweb services=E2=80=9D break= ing HTTP spec. in various ways and claiming =E2=80=9Cwell we are not HTTP just very-HTTP-like=E2=80= =9D 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?