From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Derek Upham Newsgroups: gmane.lisp.guile.devel Subject: Re: [Patch] Support HTTP/2 in HTTP client Date: Wed, 1 Apr 2020 03:21:59 +0200 (CEST) Message-ID: <87sghongp7.fsf@priss.frightenedpiglet.com> References: <87v9mkoab3.fsf@priss.frightenedpiglet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="63214"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.3.2; emacs 28.0.50 To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Apr 01 03:22:19 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 1jJS5D-000GMZ-Mn for guile-devel@m.gmane-mx.org; Wed, 01 Apr 2020 03:22:19 +0200 Original-Received: from localhost ([::1]:45748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJS5C-0003xT-PN for guile-devel@m.gmane-mx.org; Tue, 31 Mar 2020 21:22:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47031) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJS4z-0003uE-Qh for guile-devel@gnu.org; Tue, 31 Mar 2020 21:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJS4y-0002sg-HG for guile-devel@gnu.org; Tue, 31 Mar 2020 21:22:05 -0400 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:46708) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJS4y-0002hc-1s for guile-devel@gnu.org; Tue, 31 Mar 2020 21:22:04 -0400 Original-Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id 05E69640 for ; Wed, 1 Apr 2020 03:22:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailfence.com; s=20160819-nLV10XS2; t=1585704122; bh=/qRPJo1FuqN10ZmVgl1MXBJl1MiotJsvtAsDaNcHX7k=; h=References:From:To:Subject:In-reply-to:Date:From; b=DurzcKn6o9Pvx6kCxXZkczaSPmLWf0rLBgNukz44OQHUjCbpagi7pXSYEMAT40ZNK mYp5MWFVtSqoygXtIaLXfpzoLqfWDDsmOLIBZuJvh+S6yfB2R51I1BY4uhIsr999dZ M4pNl3RgfkzQtUEoCaNRof1LmEVu4cISB6rqDjS1202fQSBDfIeoGjGIDF2bqBPNcX JKBlRdpfcRmoodaWof354nQYQ1u6uggatm4w4Jm7M+z4uHiZbtH2iDr7G8vAfga8g4 bWqCxMt/RcqXmmNuIfDrNQAgHSKIoh2Gk3zAiOi4Dczs6C7KJI1s6BjFkW0m2/Z055 BxIU/Tty/UEzw== Original-Received: by smtp.mailfence.com with ESMTPSA for ; Wed, 1 Apr 2020 03:21:58 +0200 (CEST) Original-Received: from localhost ([::1] helo=priss.frightenedpiglet.com) by priss.frightenedpiglet.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jJS4q-00Fb8w-7z; Tue, 31 Mar 2020 18:21:56 -0700 In-reply-to: X-ContactOffice-Account: com:175140567 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.3.242.97 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:20479 Archived-At: I made this particular tweak because Guile 2.2=E2=80=99s HTTP/1.1 client=20 requests were getting back an HTTP/2 response from a podcast=20 server, and choking. (The use of Google=E2=80=99s URL was just an example= =20 to show the format of the HTTP response header.) Let=E2=80=99s drop the=20 patch for now. I=E2=80=99ll try disabling it locally and see whether I=20 can still reproduce it. Given the amount of redirects that media=20 website backends do, it=E2=80=99s possible that I=E2=80=99ll never come acr= oss the=20 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=20 > 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 structur= e, 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 don= =E2=80=99t >> proliferate quickly, so the code uses a brute force approach=20 >> for >> now. >> >> >> Derek >> >> -- >> Derek Upham >> derek_upham@mailfence.com --=20 Derek Upham derek_upham@mailfence.com