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 21:58:22 -0400 Message-ID: References: <87ftml295d.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="186793"; 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 Thu Aug 01 03:59:09 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 1ht0N2-000mTZ-Qy for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2019 03:59:08 +0200 Original-Received: from localhost ([::1]:45462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ht0N1-0007LT-8Q for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Jul 2019 21:59:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41981) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ht0Mx-0007LM-7z for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 21:59:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ht0Mw-0008Q9-7W for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 21:59:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ht0Mv-0008Q3-S5 for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 21:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ht0Mv-0007YT-PU for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 21:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Aug 2019 01:59: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.156462471229005 (code B ref 35969); Thu, 01 Aug 2019 01:59:01 +0000 Original-Received: (at 35969) by debbugs.gnu.org; 1 Aug 2019 01:58:32 +0000 Original-Received: from localhost ([127.0.0.1]:53321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ht0MS-0007Xl-Bg for submit@debbugs.gnu.org; Wed, 31 Jul 2019 21:58:32 -0400 Original-Received: from mail-io1-f43.google.com ([209.85.166.43]:36224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ht0MQ-0007XZ-OO for 35969@debbugs.gnu.org; Wed, 31 Jul 2019 21:58:31 -0400 Original-Received: by mail-io1-f43.google.com with SMTP id o9so37193211iom.3 for <35969@debbugs.gnu.org>; Wed, 31 Jul 2019 18:58:30 -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=w+Nq6dSaT5OcvreQcO+QdEWkO9Y214E0n1DHy9XVIUk=; b=Qf42wPNt3OPgp0Pj3V/6wiRe6Pp3s4fDgBhCOZtVfG2VZXPYMFeKOheJPot1Hzd9ZU a8OfIBJ7xX5xPHanlVe5vpGRCHJ8sh8Gf1bHu2VvzRXt+7xkzPX6E0zurXF0yMmbG5fl Ssduiud6pXV/MOLGJmTOXWVPBVtGa1899E4KwS/+uffh21P9TTXpaTO35TQbarTgtA0t vXg2j38V5wFlmYrAZZQP00fh0FlmUY352GQqoLGB7jPTbNCThZABx+0AkV9XK+5p3sKI lcPNTHqNc82NWJrXVuk3JTPozryrGn1nxRQ8WeDc+TrT1epRJG8AZNc0dnlBqM+fQOUN QXfA== 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=w+Nq6dSaT5OcvreQcO+QdEWkO9Y214E0n1DHy9XVIUk=; b=rJqRZVOLaCWwQPHxwlV46VhBfy+3ln2YEgPSxk4LoklurpmYRUeOBUEOjgBtGVfZWd TezZxkZokClZh/KqgVZPzXKBPfC0hJqcY+eml44a2ttCmTsJJgWH8Oj7asuDTzGxI8li vFvow+QYzbZ9PNhx0K9tqQ92znDeVF5df+IIXYZ7XTn6LkAFjHWdy0K4AnQRH7GnZdd0 2aCHGN9wOqJATrnERx1WUO0SG1kUzAg0bMd7iUCFnHFFTi0TxOWwG8crv5iOgftJgUfE I1AxObhVT7ifg6rRpL0255D29yZpz83NktRvh+X7WaRyYRUEPmvnzBIjrYbwUc6jKC2A iLCg== X-Gm-Message-State: APjAAAUFF+ApPe3lmc5CSlU31O3lvN3NWHZUDjb1THvduIsxd313zXz3 CgXeVk0lL4ycg0tte+wI2rZ8qsDP X-Google-Smtp-Source: APXvYqxAvV6nsHLYJPj4UK0X5WaXEv4X04TO0zHqTSQy+wvJIOByn2Dp67bxIy7qoF22vaFcOoUBjg== X-Received: by 2002:a5e:a708:: with SMTP id b8mr2143949iod.25.1564624704777; Wed, 31 Jul 2019 18:58:24 -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 r7sm50781964ioa.71.2019.07.31.18.58.23 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jul 2019 18:58:23 -0700 (PDT) In-Reply-To: <87ftml295d.fsf@igel.home> (Andreas Schwab's message of "Wed, 31 Jul 2019 23:20:46 +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:164201 Archived-At: Andreas Schwab writes: > On Jul 31 2019, Thomas Fitzsimmons wrote: > >> Andreas, do you have a test case that patch A fixed, and if so, can >> you retest with the proposed fix? > > Any https request over proxy will do. OK, I tested the attached patch; it works for a request to an uncached HTTPS website, and it works for Excorporate accessing an HTTPS server. I moved the URL form logic to url-http-create-request because that function refers to using-proxy (set to url-http-proxy on entry) in multiple places, not just during URL recreation. When url-https-proxy-after-change-function was setting using-proxy to nil for the entire duration of the url-http-create-request, it was interfering with "Connection" handling later in the function: "Connection: " (if (or using-proxy (not url-http-attempt-keepalives)) "close" "keep-alive") Does this look OK to push to master? Thanks, Thomas diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 838f0a30c1..354cc56de4 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -329,7 +329,9 @@ 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)) " HTTP/" url-http-version "\r\n" ;; Version of MIME we speak "MIME-Version: 1.0\r\n" @@ -1435,9 +1437,7 @@ 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 - ;; Use the non-proxy form of the request - (let (url-http-proxy) - (url-http-create-request)))) + (url-http-create-request))) (gnutls-error (url-http-activate-callback) (error "gnutls-error: %s" e))