GNU bug report logs - #35969
proxy + excorporate -> Failed: Failed to retrieve https://outlook.office365.com/EWS/Services.wsdl

Previous Next

Package: emacs;

Reported by: "tenspd137 ." <dcday137 <at> gmail.com>

Date: Tue, 28 May 2019 22:26:02 UTC

Severity: normal

Found in version 26.2

Done: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>

Bug is archived. No further changes may be made.

Full log


Message #127 received at 35969 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Collin Day <dcday137 <at> gmail.com>, 35969 <at> debbugs.gnu.org
Subject: Re: bug#35969: 26.2, Excorporate
Date: Wed, 31 Jul 2019 21:58:22 -0400
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> On Jul 31 2019, Thomas Fitzsimmons <fitzsim <at> fitzsim.org> 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))




This bug report was last modified 5 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.