From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel,gmane.comp.gnu.guix.devel Subject: Re: [PATCH] gnu: Add erlang. Date: Mon, 04 Jan 2016 20:13:25 +0800 Organization: HFG Message-ID: <1451909605.3594.141.camel@Renee-desktop.suse> References: <20160104043952.GA29303@jasmine> <877fjpzi07.fsf@igalia.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1451909627 32554 80.91.229.3 (4 Jan 2016 12:13:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jan 2016 12:13:47 +0000 (UTC) Cc: guix-devel@gnu.org, Steve Sprang , guile-devel@gnu.org, Leo Famulari To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jan 04 13:13:38 2016 Return-path: Envelope-to: guile-devel@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 1aG414-0005GZ-9v for guile-devel@m.gmane.org; Mon, 04 Jan 2016 13:13:38 +0100 Original-Received: from localhost ([::1]:44664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG413-00073R-G2 for guile-devel@m.gmane.org; Mon, 04 Jan 2016 07:13:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG40z-00072L-Ut for guile-devel@gnu.org; Mon, 04 Jan 2016 07:13:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aG40y-0005ew-TN for guile-devel@gnu.org; Mon, 04 Jan 2016 07:13:33 -0500 Original-Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]:34887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG40u-0005eR-ED; Mon, 04 Jan 2016 07:13:28 -0500 Original-Received: by mail-pf0-x230.google.com with SMTP id 78so203469562pfw.2; Mon, 04 Jan 2016 04:13:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:mime-version:content-transfer-encoding; bh=DWuRPlrbHyXNKe6C8Bgw/83nwtwUeg2YmJM7y1bXU5Y=; b=aDIaFh3QYM4XuzYXEl3fQRvn3RZ6sfwXnubvSKW3MzPgAFPkoTlBAVMgs6bsmrBAai pwQZwwkDfhx5ZA5uNzkBtJUsNCOcUUAxPhvdBEZsYXenjKhrxQ5zftWWkaemTcWAN23a S4UW9NGko4n1D7w+8Ue1mMB7HCwijRULNPniOcuBFEmLbDEZC7DGj3E2CT9op+a+DCbV lTKSqT6mb703t5LcPFiEjjitYsE4Yvo9siy8n+/QJ4KFZhy7NHyLJmkK1UsTZP1gA/ZQ v0SEJIgfkC4AjKlAoux35AKhYvMzWyqT76fxXAxRNVrpIUeuh6srmzIzTgPnLYlzs909 JZNA== X-Received: by 10.98.86.195 with SMTP id h64mr127128440pfj.96.1451909607735; Mon, 04 Jan 2016 04:13:27 -0800 (PST) Original-Received: from [147.2.147.24] ([203.192.156.9]) by smtp.gmail.com with ESMTPSA id p80sm96039834pfi.12.2016.01.04.04.13.26 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Jan 2016 04:13:27 -0800 (PST) In-Reply-To: <877fjpzi07.fsf@igalia.com> X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::230 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:18105 gmane.comp.gnu.guix.devel:14847 Archived-At: 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 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 >