From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Tristan Colgate Newsgroups: gmane.lisp.guile.devel Subject: Re: [Patch] Support HTTP/2 in HTTP client Date: Wed, 1 Apr 2020 08:24:12 +0100 Message-ID: References: <87v9mkoab3.fsf@priss.frightenedpiglet.com> <87sghongp7.fsf@priss.frightenedpiglet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="78457"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: Derek Upham Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Apr 01 09:24:41 2020 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJXjt-000KI6-3O for guile-devel@m.gmane-mx.org; Wed, 01 Apr 2020 09:24:41 +0200 Original-Received: from localhost ([::1]:48284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJXjs-0004F4-5i for guile-devel@m.gmane-mx.org; Wed, 01 Apr 2020 03:24:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45983) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJXjf-0004Ek-5u for guile-devel@gnu.org; Wed, 01 Apr 2020 03:24:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJXjd-0004jv-PX for guile-devel@gnu.org; Wed, 01 Apr 2020 03:24:27 -0400 Original-Received: from mail-vs1-xe33.google.com ([2607:f8b0:4864:20::e33]:41019) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJXjd-0004hk-Ku for guile-devel@gnu.org; Wed, 01 Apr 2020 03:24:25 -0400 Original-Received: by mail-vs1-xe33.google.com with SMTP id a63so15215087vsa.8 for ; Wed, 01 Apr 2020 00:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=fjW2bvfrECexClylUJ+F2jcFApq6g8B+Rau4K9vvrKY=; b=sOcgaKsyKf45fR0ZdDxVyMkVHEtt1QIojrKVCFXqUXGSK0ITVpl4B5Bw0mc31Q33l2 mus6/YrUEIwTA8bJddszwkjafLE6a611SPBtyZpF9tXIOH4gkkIdF92AL8m6NEzHoBRX qJVMRI08ZBMYUxBEVOn6qGXF7qk84m5F6CQirlgwoKgaUDyK5W2vzaSuTGuJecwDIDPz fEFxSw+8EZkRcEfN9RM9klj4bHEuhbu6SqN2HJDfIZIVqkTgnXFwA1irMAoLFTDg/Wbx A4FlMzyZrJN/3Z/9JBeQNWbul8YWH6Aa8lwyhESoTDsZ7akPNDvFMmmg1xbZdAan9UHr hJZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fjW2bvfrECexClylUJ+F2jcFApq6g8B+Rau4K9vvrKY=; b=mg1HztLgkNgjzA2AuLxDwMb+WaUpHDmL2NZzRRKv9JckSh1ivR8BPGr92iTlLW/KBa awdrxIHRPoRYS8wxdQvkcB/wGnZEhaYzZHVTlUlzx5PvZbK1lxiw1kPvOCiFDJnCN5Uj ywnSPuGLhSXkQExcJArrTmxGxhEVozLQcHYP1UzWY0VYOHkMXwFV0pecx7HcYYTDZz42 nwIIL2FMeVY0HJhMlnvYZK/N9FllkcFNAllZYW33e613S/eVJ1+1h6qhYCogjdKbPVR4 4BiR0w9LhHTqcajdjTpzXzQ+68Kg4Wgh7Z9NHLlORjOHsHUIq688O8KOV24X8ugT6Qbs xJUA== X-Gm-Message-State: AGi0PuYohs5/i1yBIW6skLjEN9XXMMEQqvIHjC/EcNHZSEwuSRCiOboe Nb6+8en+8Z7WwhcmPiAxGkY4SneOzAAd+GpfobY= X-Google-Smtp-Source: APiQypInxieMarfLWUXp5nDNwIhYwYEduiEgkoYWE3IRP/CdsfnwQ3do83bJuMAWwdk/XZoK7y7rEbvL1VXx8/esU4M= X-Received: by 2002:a67:8806:: with SMTP id k6mr16550081vsd.59.1585725864216; Wed, 01 Apr 2020 00:24:24 -0700 (PDT) In-Reply-To: <87sghongp7.fsf@priss.frightenedpiglet.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::e33 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20480 Archived-At: I'm not sure why a server would give you a http2 response if you didn't ask for one (or atleast suggest you could accept one), in the tls ALPN. If it happened on a non-tls request, I'm even more confused. Note that curl, without extra cli options, will negotiate http2, so you need to make sure that guile actually saw that, and not just assume that it did because curl saw it (you can force the http version with, e.g. --http1.1) If you get a http/2 response, the client, as is, wont be able to process it anyway, so error'ing is very must the right thing to do. http/2 isn't just a cosmetic change, it's an entirely different protocol, not text based, multi request/response streams, an compression mechanism that uses pre-baked tables based on online observed data. On Wed, 1 Apr 2020 at 02:22, Derek Upham wrote: > > I made this particular tweak because Guile 2.2=E2=80=99s HTTP/1.1 client > requests were getting back an HTTP/2 response from a podcast > server, and choking. (The use of Google=E2=80=99s URL was just an exampl= e > to show the format of the HTTP response header.) Let=E2=80=99s drop the > patch for now. I=E2=80=99ll try disabling it locally and see whether I > can still reproduce it. Given the amount of redirects that media > website backends do, it=E2=80=99s possible that I=E2=80=99ll never come a= cross the > problem again. > > Derek > > Tristan Colgate writes: > > > http/2 is a substantially different protocol, it will take > > considerable effort to support it, guile's client should only be > > offering http/1.1 to the server. > > > > On Tue, 31 Mar 2020 at 15:49, Derek Upham > > wrote: > >> > >> Companies like Google now respond to HTTP requests with HTTP 2. > >> For example: > >> > >> curl --silent --head https://www.google.com > >> > >> returns the first line > >> > >> HTTP/2 200 > >> > >> The Guile HTTP client code expects a =E2=80=9CHTTP/x.y=E2=80=9D struct= ure, and > >> treats this as an error. This patch recognizes and handles > >> =E2=80=9CHTTP/2=E2=80=9D on input and output. HTTP version numbers do= n=E2=80=99t > >> proliferate quickly, so the code uses a brute force approach > >> for > >> now. > >> > >> > >> Derek > >> > >> -- > >> Derek Upham > >> derek_upham@mailfence.com > > > -- > Derek Upham > derek_upham@mailfence.com > --=20 Tristan Colgate-McFarlane ---- "You can get all your daily vitamins from 52 pints of guiness, and a glass of milk"I'm not sure why a server would give you a http2 response if you didn't ask for one (or atleast suggest you could accept one), in the tls ALPN. If it happened on a non-tls request, I'm even more confused. If you get a http/2 response, the client, as is, wont be able to process it anyway, so error'ing is very must the right thing to do. http/2 isn't just a cosmetic change, it's an entirely different protocol, not text based, multi request/response streams, a On Wed, 1 Apr 2020 at 02:22, Derek Upham wrote: > > I made this particular tweak because Guile 2.2=E2=80=99s HTTP/1.1 client > requests were getting back an HTTP/2 response from a podcast > server, and choking. (The use of Google=E2=80=99s URL was just an exampl= e > to show the format of the HTTP response header.) Let=E2=80=99s drop the > patch for now. I=E2=80=99ll try disabling it locally and see whether I > can still reproduce it. Given the amount of redirects that media > website backends do, it=E2=80=99s possible that I=E2=80=99ll never come a= cross the > problem again. > > Derek > > Tristan Colgate writes: > > > http/2 is a substantially different protocol, it will take > > considerable effort to support it, guile's client should only be > > offering http/1.1 to the server. > > > > On Tue, 31 Mar 2020 at 15:49, Derek Upham > > wrote: > >> > >> Companies like Google now respond to HTTP requests with HTTP 2. > >> For example: > >> > >> curl --silent --head https://www.google.com > >> > >> returns the first line > >> > >> HTTP/2 200 > >> > >> The Guile HTTP client code expects a =E2=80=9CHTTP/x.y=E2=80=9D struct= ure, and > >> treats this as an error. This patch recognizes and handles > >> =E2=80=9CHTTP/2=E2=80=9D on input and output. HTTP version numbers do= n=E2=80=99t > >> proliferate quickly, so the code uses a brute force approach > >> for > >> now. > >> > >> > >> Derek > >> > >> -- > >> Derek Upham > >> derek_upham@mailfence.com > > > -- > Derek Upham > derek_upham@mailfence.com > --=20 Tristan Colgate-McFarlane ---- "You can get all your daily vitamins from 52 pints of guiness, and a glass of milk"