From: Nala Ginrut <nalaginrut@gmail.com>
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org, Steve Sprang <steve.sprang@gmail.com>,
guile-devel@gnu.org, Leo Famulari <leo@famulari.name>
Subject: Re: [PATCH] gnu: Add erlang.
Date: Mon, 04 Jan 2016 20:13:25 +0800 [thread overview]
Message-ID: <1451909605.3594.141.camel@Renee-desktop.suse> (raw)
In-Reply-To: <877fjpzi07.fsf@igalia.com>
Someone had reported the similar problem to Artanis:
https://github.com/NalaGinrut/artanis/issues/44
It's because some client (firefox, in this case) emits wrong header. But
nowadays many clients seems break RFC. Maybe make the parsing rule
little looser is better.
And maybe add a warning? But seems useless to change anything.
So I agree with you to change our http parser.
Best regards.
On Mon, 2016-01-04 at 12:44 +0100, Andy Wingo wrote:
> On Mon 04 Jan 2016 06:20, Steve Sprang <steve.sprang@gmail.com> writes:
>
> > From http://www.erlang.org/download/otp_src_18.2.1.tar.gz...
> > 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
> Host: www.erlang.org
> 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
> Connection:close
>
> ...
>
> The Etag value is invalid:
>
> https://tools.ietf.org/html/rfc7232#section-2.3
>
> 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)
> (cond
> ((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.
>
> Thoughts?
>
> Andy
>
next prev parent reply other threads:[~2016-01-04 12:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 3:56 [PATCH] gnu: Add erlang Steve Sprang
2016-01-04 4:39 ` Leo Famulari
2016-01-04 5:20 ` Steve Sprang
2016-01-04 6:23 ` Leo Famulari
2016-01-04 11:44 ` Andy Wingo
2016-01-04 12:13 ` Nala Ginrut [this message]
2016-01-06 16:07 ` Ludovic Courtès
2016-01-07 9:56 ` Andy Wingo
2016-02-06 20:45 ` Steve Sprang
2016-02-13 0:44 ` Leo Famulari
2016-02-13 21:12 ` Efraim Flashner
2016-02-21 20:54 ` Ludovic Courtès
2016-03-17 0:18 ` Steve Sprang
2016-03-17 4:21 ` Leo Famulari
2016-03-17 5:00 ` Steve Sprang
2016-03-21 15:40 ` Leo Famulari
2016-03-22 20:59 ` Pjotr Prins
2016-03-22 21:21 ` Leo Famulari
2016-03-24 2:41 ` Leo Famulari
2016-03-24 16:57 ` Pjotr Prins
2016-03-24 22:53 ` gnu: Add elixir. (WIP) Pjotr Prins
2016-03-25 16:50 ` Leo Famulari
2016-06-22 19:42 ` bug#19439: [PATCH] gnu: Add erlang Andy Wingo
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://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1451909605.3594.141.camel@Renee-desktop.suse \
--to=nalaginrut@gmail.com \
--cc=guile-devel@gnu.org \
--cc=guix-devel@gnu.org \
--cc=leo@famulari.name \
--cc=steve.sprang@gmail.com \
--cc=wingo@igalia.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.
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).