[Top][All Lists]

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

Re: [PATCH] gnu: Add erlang.

From: Andy Wingo
Subject: Re: [PATCH] gnu: Add erlang.
Date: Mon, 04 Jan 2016 12:44:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Mon 04 Jan 2016 06:20, Steve Sprang <address@hidden> writes:

> From
> ERROR: Bad qstring header component: kMSMAn68110840

This means the server is emitting bad HTTP.  If I connect with:

   GET /download/otp_src_18.2.1.tar.gz HTTP/1.1
   Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
   User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/601.1 (KHTML, like 
Gecko) Version/8.0 Safari/601.1 Epiphany/3.16.3
   Accept-Encoding: gzip, deflate
   Accept-Language: en
   Connection: Keep-Alive

The server responds with:

   HTTP/1.1 200 OK
   Server: inets/5.7.1
   Date: Mon, 04 Jan 2016 11:32:30 GMT
   Content-Type: text/plain;  charset=utf-8
   Etag: kMSMAn68110840
   Content-Length: 68110840
   Last-Modified: Fri, 18 Dec 2015 11:00:38 GMT


The Etag value is invalid:

We could relax Guile's etag parser to assume that an etag not starting
with either W/ or " is a strong etag without quotes.  To do that you
would patch guile's http.scm to say:

(define (parse-entity-tag val)
   ((string-prefix? "W/" val) (cons (parse-qstring val 2) #f))
   ((string-prefix? "\"" val) (cons (parse-qstring val) #t))
   (else (cons val #t))))

Considering that this error has come up a few times and that the less
strict parser doesn't change the Guile programming interface or endanger
the web in any significant way, I think changing Guile's HTTP parser
would be OK.



reply via email to

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