From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#39800: gnutls guile bug receiving https data Date: Fri, 06 Mar 2020 23:46:35 +0100 Message-ID: <87sgilje44.fsf@gnu.org> References: <7923a31f-d916-01e9-be04-44bf1f131b2a@gmail.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="127256"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 39800-done@debbugs.gnu.org To: "franco.rcr\@gmail.com" Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Mar 06 23:47:11 2020 Return-path: Envelope-to: guile-bugs@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 1jALkM-000Wzd-Uj for guile-bugs@m.gmane-mx.org; Fri, 06 Mar 2020 23:47:10 +0100 Original-Received: from localhost ([::1]:43194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jALkM-0002FK-0j for guile-bugs@m.gmane-mx.org; Fri, 06 Mar 2020 17:47:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55618) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jALkF-0002F2-Nq for bug-guile@gnu.org; Fri, 06 Mar 2020 17:47:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jALkE-0003uo-K3 for bug-guile@gnu.org; Fri, 06 Mar 2020 17:47:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40015) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jALkE-0003uV-Gq for bug-guile@gnu.org; Fri, 06 Mar 2020 17:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jALkE-0005It-Bp for bug-guile@gnu.org; Fri, 06 Mar 2020 17:47:02 -0500 Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Fri, 06 Mar 2020 22:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 39800 X-GNU-PR-Package: guile Mail-Followup-To: 39800@debbugs.gnu.org, ludo@gnu.org, franco.rcr@gmail.com Original-Received: via spool by 39800-done@debbugs.gnu.org id=D39800.158353480520360 (code D ref 39800); Fri, 06 Mar 2020 22:47:01 +0000 Original-Received: (at 39800-done) by debbugs.gnu.org; 6 Mar 2020 22:46:45 +0000 Original-Received: from localhost ([127.0.0.1]:45987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jALjx-0005IK-1U for submit@debbugs.gnu.org; Fri, 06 Mar 2020 17:46:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jALju-0005I6-QG for 39800-done@debbugs.gnu.org; Fri, 06 Mar 2020 17:46:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jALjp-0002oD-KQ; Fri, 06 Mar 2020 17:46:37 -0500 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=59712 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jALjp-0000VW-6j; Fri, 06 Mar 2020 17:46:37 -0500 In-Reply-To: <7923a31f-d916-01e9-be04-44bf1f131b2a@gmail.com> (franco's message of "Wed, 26 Feb 2020 16:20:09 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9618 Archived-At: Hi, "franco.rcr@gmail.com" skribis: > ;;Now, submitting this simple https request, you get an exception > (http-request "https://www.google.com") > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > Throw to key `gnutls-error' with args `(# connessione TLS non =C3=83=C2=A8 stata terminata in modo corretto.> > read_from_session_record_port)'. That happens when passing #:keep-alive? #f (the default), specifically when reading the response body: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (http-request "https://www.google.com" #:keep-alive? #= f #:streaming? #t) $1 =3D #< version: (1 . 1) code: 200 reason-phrase: "OK" headers:= ((date . #) (expires . #) (cache-control = private (max-age . 0)) (content-type text/html (charset . "ISO-8859-1")) (p= 3p . "CP=3D\"This is not a P3P policy! See g.co/p3phelp for more info.\"") = (server . "gws") (x-xss-protection . "0") (x-frame-options . "SAMEORIGIN") = (set-cookie . "1P_JAR=3D2020-03-06-21; expires=3DSun, 05-Apr-2020 21:45:56 = GMT; path=3D/; domain=3D.google.com; Secure") (set-cookie . "NID=3D199=3DyX= gE_KAGvxJbZAIGEXLt8CsEe3pre-RRLm1Jqap3b3iJRqZZq_PJ9wCT798mfDZ2TC5_3mKnM5KAB= Sh8CguI64SsNoWHIc9EsW2osFltsIJnMswXhrtjQFDpfm_fUb6RDrWrqKHkOuvkG7Izp5im1Ys1= TzGdztrFmOQV4FOraJk; expires=3DSat, 05-Sep-2020 21:45:56 GMT; path=3D/; dom= ain=3D.google.com; HttpOnly") (alt-svc . "quic=3D\":443\"; ma=3D2592000; v= =3D\"46,43\",h3-Q050=3D\":443\"; ma=3D2592000,h3-Q049=3D\":443\"; ma=3D2592= 000,h3-Q048=3D\":443\"; ma=3D2592000,h3-Q046=3D\":443\"; ma=3D2592000,h3-Q0= 43=3D\":443\"; ma=3D2592000") (accept-ranges none) (vary accept-encoding) (= connection close)) port: #> $2 =3D # scheme@(guile-user)> (define bv (get-bytevector-all $2)) ice-9/boot-9.scm:1669:16: In procedure raise-exception: Throw to key `gnutls-error' with args `(# read_from_session_record_port)'. --8<---------------cut here---------------end--------------->8--- The reason for this is that google.com closes the connection right away, without sending a proper TLS =E2=80=9Cbye=E2=80=9D message as is convention= ally done. Fixed in commit 076276c4f580368b4106316a77752d69c8f1494a, which will be in 3.0.1. Thanks, Ludo=E2=80=99.