From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#19439: guix download fails with "bad qstring header component" Date: Fri, 26 Dec 2014 23:27:19 +0100 Message-ID: <87egrmhws8.fsf@gnu.org> References: <87ppb86luq.fsf@mango.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4dMc-0001PR-Mo for bug-guix@gnu.org; Fri, 26 Dec 2014 17:28:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4dMY-0003hs-MG for bug-guix@gnu.org; Fri, 26 Dec 2014 17:28:06 -0500 Received: from debbugs.gnu.org ([140.186.70.43]:49097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4dMY-0003ho-JB for bug-guix@gnu.org; Fri, 26 Dec 2014 17:28:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y4dMY-0000zL-DR for bug-guix@gnu.org; Fri, 26 Dec 2014 17:28:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87ppb86luq.fsf@mango.localdomain> (rekado@elephly.net's message of "Thu, 25 Dec 2014 11:54:21 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: rekado Cc: 19439@debbugs.gnu.org rekado skribis: > $ ./pre-inst-env guix download http://icedtea.wildebeest.org/hg/icepick/a= rchive/15425b469aea.tar.gz > starting download of `/tmp/guix-file.zrKNcT' from `http://icedtea.wildebe= est.org/hg/icepick/archive/15425b469aea.tar.gz'... > ERROR: Bad qstring header component: 1200667312.0 Indeed. The HTTP headers here look like this: --8<---------------cut here---------------start------------->8--- Date: Fri, 26 Dec 2014 22:10:49 GMT Server: Apache/2.2.22 (Debian) ETag: 1200667312.0 --8<---------------cut here---------------end--------------->8--- For details, this can be reproduced like this: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(web client) scheme@(guile-user)> (http-get "http://icedtea.wildebeest.org/hg/icepick/ar= chive/15425b469aea.tar.gz") web/http.scm:854:12: In procedure parse-entity-tag: web/http.scm:854:12: Bad qstring header component: 1200667312.0 Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,bt In web/client.scm: 228:8 4 (request "http://icedtea.wildebeest.org/hg/icepick/archive/154= 25b469aea.tar.gz" #:body #f #:port # =E2=80=A6) In web/response.scm: 199:6 3 (read-response #) In web/http.scm: 218:33 2 (lp ((server . "Apache/2.2.22 (Debian)") (date . #))) 188:11 1 (read-header #) 854:12 0 (parse-entity-tag "1200667312.0") --8<---------------cut here---------------end--------------->8--- And indeed, Section 14.19 of says that the =E2=80=98ETag=E2=80=99 header has type =E2=80=98entity-tag=E2=80=99. =E2=80=98parse-entity-tag=E2=80=99 is written like this: --8<---------------cut here---------------start------------->8--- (define (parse-entity-tag val) (if (string-prefix? "W/" val) (cons (parse-qstring val 2) #f) (cons (parse-qstring val) #t))) --8<---------------cut here---------------end--------------->8--- Section 3.11 at confirms the above definition for =E2=80=98entity-tag=E2=80=99. Lastly, =E2=80=98quoted-string=E2=80=99 in is defined as a string surrounded by double quotes, basically. So, in short, I think Apache httpd is returning an invalid ETag header, and Guile=E2=80=99s HTTP client is right in rejecting it. Having said that doesn=E2=80=99t help much though. I=E2=80=99m not sure ho= w frequent this is, and whether/how this could be worked around. Ideas? Thanks, Ludo=E2=80=99.