From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#35969: 26.2, Excorporate Date: Wed, 31 Jul 2019 17:07:38 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="37930"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Collin Day , 35969@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 31 23:08:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hsvpV-0009l1-LQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Jul 2019 23:08:13 +0200 Original-Received: from localhost ([::1]:44608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsvpU-0002BE-Fr for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Jul 2019 17:08:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42725) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsvpN-0002AU-3i for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 17:08:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsvpM-00082b-3R for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 17:08:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44360) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hsvpL-00082C-Q4 for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 17:08:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hsvpJ-0004E3-Mn for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 17:08:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Jul 2019 21:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35969 X-GNU-PR-Package: emacs Original-Received: via spool by 35969-submit@debbugs.gnu.org id=B35969.156460726816224 (code B ref 35969); Wed, 31 Jul 2019 21:08:01 +0000 Original-Received: (at 35969) by debbugs.gnu.org; 31 Jul 2019 21:07:48 +0000 Original-Received: from localhost ([127.0.0.1]:53181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsvp6-0004Dc-C9 for submit@debbugs.gnu.org; Wed, 31 Jul 2019 17:07:48 -0400 Original-Received: from mail-io1-f45.google.com ([209.85.166.45]:39693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsvp3-0004DK-QE for 35969@debbugs.gnu.org; Wed, 31 Jul 2019 17:07:46 -0400 Original-Received: by mail-io1-f45.google.com with SMTP id f4so139495373ioh.6 for <35969@debbugs.gnu.org>; Wed, 31 Jul 2019 14:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Lukz1+hTk1A20REsWCKDtw+cIl2RpRfuc5ay5sqp5lA=; b=gTjuuy+4NiWteumBFtaEZ1ULr0xktHjtJmBKKHoTMXycRdOrAIVd3uX+4+xwZij+Wx RPT1MoBcpSDXdPHAoCuxM3cU22hHnuSt9CPcd+rGbBoUuW2FVvTiuq4AVWo2vuRt2Enr Feru9xI9y8vAojn6Hp9KaEdLQbGJY74t2KA3RP+6y/4pM3ER6+2Mp+MJO8lcqkZlqra9 0bvorVTNFz/hwifekeeh9oJmPoaeB2rOUvGjvYmw7PlpXg9bHCfmrjVxV6moduume2X0 l6WDvyW3gH+TL5RWLKEpaiJW2UCDOkgL2g4Qy6Nht1ORsBvYtajuj75nDLFjp+ftVBiV 4Bxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Lukz1+hTk1A20REsWCKDtw+cIl2RpRfuc5ay5sqp5lA=; b=uF9sKqa3jQOAXQRzOAiKZUhefkqxIZivsghKxjkP823KsSNxiCfud0Kaun+8FSCqmB XJKaXI9AYUbtswLVekXL7GjGi5gs+eJKk92wO9R2bXwO3AvxcjpO/WVx+OKQeIRH3Rvk l43bCVXhQKXAXoyp40KzfSHixfVVDUG1fi1kSnqCCFlsroi/jitohc+s3csTPple54mR 0LfwgXzUqip5Ml/Xg/VC0issSY9jldVBnmIrEk6yjqBQqvgHBJ7lELV9eFIGRkCasKt0 GMNa7Y0tRuWDxkti4d9QKw+BdnxoKwtJy59hLFAt7BuixpmNdfUajLR1zVsLu1txYDIW 6oiA== X-Gm-Message-State: APjAAAVsfyeROZ+7uRdep3n3g1qqI2GLunJiOklu8b88OB/f3tCDizjT Miv3d7FOzsMTV7DdU02ttZf/GAzO X-Google-Smtp-Source: APXvYqzNMq/+xqompZkjuP6magxA26ryt3CrSglG40+iSWWDUXsaX40cXZhGoIYqO3L3+D+TAhCLIA== X-Received: by 2002:a5d:8253:: with SMTP id n19mr13205763ioo.80.1564607259847; Wed, 31 Jul 2019 14:07:39 -0700 (PDT) Original-Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id s2sm49411228ioj.8.2019.07.31.14.07.38 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jul 2019 14:07:38 -0700 (PDT) In-Reply-To: (Andreas Schwab's message of "Sat, 15 Jun 2019 09:41:33 +0200") 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-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164189 Archived-At: Hi, I found a proxy server to test against. I've now replicated Collin's findings. Andreas Schwab writes: > On Jun 14 2019, Thomas Fitzsimmons wrote: > >> diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el >> index 00803a103a..723d111d58 100644 >> --- a/lisp/url/url-http.el >> +++ b/lisp/url/url-http.el >> @@ -329,7 +329,10 @@ url-http-create-request >> ;; The request >> (or url-http-method "GET") " " >> (url-http--encode-string >> - (if using-proxy (url-recreate-url url-http-target-url) real-fname)) >> + (if (and using-proxy >> + (not (equal "https" (url-type url-http-target-url)))) >> + (url-recreate-url url-http-target-url) >> + real-fname)) For discussion purposes, let's call the above "patch T"... > That should already be handled by commit 84613dae5c. ... and this commit "patch A", which is: diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 53798f77c3..817c5ce3b3 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1412,7 +1412,9 @@ url-https-proxy-after-change-function 'url-http-wait-for-headers-change-function) (set-process-filter tls-connection 'url-http-generic-filter) (process-send-string tls-connection - (url-http-create-request))) + ;; Use the non-proxy form of the request + (let (url-http-proxy) + (url-http-create-request)))) (gnutls-error (url-http-activate-callback) (error "gnutls-error: %s" e)) I tried on Emacs 26.2 and master tip, and in both cases, Excorporate worked with patch T applied and patch A not present (26.2) or reverted (master); it failed with any other combination of the patches (A and T, A only, neither A nor T). One difference I noticed is that with A applied, the Connection header is set to keep-alive and the connection is reused, whereas with just T, Connection is set to close and the connection is re-established. The attached patch fixes it. Andreas, do you have a test case that patch A fixed, and if so, can you retest with the proposed fix? Thanks, Thomas diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 838f0a30c1..eb054cd65a 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1436,7 +1436,8 @@ url-https-proxy-after-change-function (set-process-filter tls-connection 'url-http-generic-filter) (process-send-string tls-connection ;; Use the non-proxy form of the request - (let (url-http-proxy) + (let (url-http-proxy + url-http-attempt-keepalives) (url-http-create-request)))) (gnutls-error (url-http-activate-callback)