unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19439: guix download fails with "bad qstring header component"
@ 2014-12-25 10:54 rekado
  2014-12-26 22:27 ` Ludovic Courtès
  2015-01-29 16:16 ` Eric Bavier
  0 siblings, 2 replies; 4+ messages in thread
From: rekado @ 2014-12-25 10:54 UTC (permalink / raw)
  To: 19439

In an attempt to build the OpenJDK tools with icepick, I'm getting an
error when downloading the icepick tarball:

~~~~~~~~~~~~~
$ ./pre-inst-env guix download http://icedtea.wildebeest.org/hg/icepick/archive/15425b469aea.tar.gz
starting download of `/tmp/guix-file.zrKNcT' from `http://icedtea.wildebeest.org/hg/icepick/archive/15425b469aea.tar.gz'...
ERROR: Bad qstring header component: 1200667312.0

failed to download "/tmp/guix-file.zrKNcT" from "http://icedtea.wildebeest.org/hg/icepick/archive/15425b469aea.tar.gz"
guix download: error: http://icedtea.wildebeest.org/hg/icepick/archive/15425b469aea.tar.gz: download failed
~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#19439: guix download fails with "bad qstring header component"
  2014-12-25 10:54 bug#19439: guix download fails with "bad qstring header component" rekado
@ 2014-12-26 22:27 ` Ludovic Courtès
  2015-01-29 16:16 ` Eric Bavier
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2014-12-26 22:27 UTC (permalink / raw)
  To: rekado; +Cc: 19439

rekado <rekado@elephly.net> skribis:

> $ ./pre-inst-env guix download http://icedtea.wildebeest.org/hg/icepick/archive/15425b469aea.tar.gz
> starting download of `/tmp/guix-file.zrKNcT' from `http://icedtea.wildebeest.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/archive/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/15425b469aea.tar.gz" #:body #f #:port #<input-output: s…> …)
In web/response.scm:
    199:6  3 (read-response #<input-output: socket 13>)
In web/http.scm:
   218:33  2 (lp ((server . "Apache/2.2.22 (Debian)") (date . #<date nanosecond: 0 second: 3 minute: 14 hour: 22 day: 26 mont…>)))
   188:11  1 (read-header #<input-output: socket 13>)
   854:12  0 (parse-entity-tag "1200667312.0")
--8<---------------cut here---------------end--------------->8---

And indeed, Section 14.19 of
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html> says that the
‘ETag’ header has type ‘entity-tag’.

‘parse-entity-tag’ 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 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html>
confirms the above definition for ‘entity-tag’.

Lastly, ‘quoted-string’ in
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html> 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’s HTTP client is right in rejecting it.

Having said that doesn’t help much though.  I’m not sure how frequent
this is, and whether/how this could be worked around.  Ideas?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#19439: guix download fails with "bad qstring header component"
  2014-12-25 10:54 bug#19439: guix download fails with "bad qstring header component" rekado
  2014-12-26 22:27 ` Ludovic Courtès
@ 2015-01-29 16:16 ` Eric Bavier
  2015-02-03 22:32   ` Ricardo Wurmus
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Bavier @ 2015-01-29 16:16 UTC (permalink / raw)
  To: 19439

I've encountered the same issue while attempting to upgrade the
python-pillow package.  For the newer versions 2.6.2 and 2.7.0, the
following errors are reported when downloading the source::

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
starting download of
`/gnu/store/i40q1mk9dnkg2mfyvfhjyq8lcywmgvh1-Pillow-2.7.0.tar.gz' from
`https://pypi.python.org/packages/source/P/Pillow/Pillow-2.7.0.tar.gz'...
ERROR: Bad qstring header component: 3fdc9f16a1b60366ae8158b424655d10

failed to download
"/gnu/store/i40q1mk9dnkg2mfyvfhjyq8lcywmgvh1-Pillow-2.7.0.tar.gz" from
"https://pypi.python.org/packages/source/P/Pillow/Pillow-2.7.0.tar.gz"
builder for
`/gnu/store/bij5w1kppj9wiqgarmsa3nc8z73i1v6l-Pillow-2.7.0.tar.gz.drv'
failed to produce output path
`/gnu/store/i40q1mk9dnkg2mfyvfhjyq8lcywmgvh1-Pillow-2.7.0.tar.gz'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I don't have any ideas on how to work around this issue in general.  In
this case, we might be able to fetch the source from github rather than
pypi.  But this should add to the question of how frequent this problem
is.

-- 
Eric Bavier

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#19439: guix download fails with "bad qstring header component"
  2015-01-29 16:16 ` Eric Bavier
@ 2015-02-03 22:32   ` Ricardo Wurmus
  0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2015-02-03 22:32 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 19439


Eric Bavier writes:

> I've encountered the same issue while attempting to upgrade the
> python-pillow package.  For the newer versions 2.6.2 and 2.7.0, the
> following errors are reported when downloading the source::

[...]

> I don't have any ideas on how to work around this issue in general.  In
> this case, we might be able to fetch the source from github rather than
> pypi.  But this should add to the question of how frequent this problem
> is.

FWIW, pypi.python.org has been fixed after reporting the issue to the
webmasters.

Would it be desirable for the HTTP client to be a little more tolerant
in general?

~~ Ricardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-03 22:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-25 10:54 bug#19439: guix download fails with "bad qstring header component" rekado
2014-12-26 22:27 ` Ludovic Courtès
2015-01-29 16:16 ` Eric Bavier
2015-02-03 22:32   ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).