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: Fri, 14 Jun 2019 20:36:24 -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="99572"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35969@debbugs.gnu.org To: "tenspd137 ." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 15 02:37:18 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 1hbwh3-000Pk6-IL for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jun 2019 02:37:17 +0200 Original-Received: from localhost ([::1]:57794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbwh2-0007ze-Ke for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2019 20:37:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59480) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbwgq-0007hS-44 for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 20:37:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbwgp-00086R-1U for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 20:37:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52816) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbwgo-00085z-Jq for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 20:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hbwgo-0000KJ-9i for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 20:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jun 2019 00:37:02 +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.15605589931211 (code B ref 35969); Sat, 15 Jun 2019 00:37:02 +0000 Original-Received: (at 35969) by debbugs.gnu.org; 15 Jun 2019 00:36:33 +0000 Original-Received: from localhost ([127.0.0.1]:38127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbwgL-0000JR-0G for submit@debbugs.gnu.org; Fri, 14 Jun 2019 20:36:33 -0400 Original-Received: from mail-io1-f41.google.com ([209.85.166.41]:41277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbwgJ-0000JA-Vw for 35969@debbugs.gnu.org; Fri, 14 Jun 2019 20:36:32 -0400 Original-Received: by mail-io1-f41.google.com with SMTP id w25so9501291ioc.8 for <35969@debbugs.gnu.org>; Fri, 14 Jun 2019 17:36:31 -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=KIs8DmgA8AccLbWwMAtSCFc8vzsoyHnUEZeT3RkF2Lo=; b=w/9M/Buue2J+K4b0+pkIHE7csfDQsfw7YH+QfqaFUP2soSm1at8Ps1CMyIC2b5JR5F KNDvCGsk7iddjaPbtOCtqAr8f2H9Iy3uR7RW0TELDzWa0JzGtYuhvW+Y037a0xDDmSlC cNA6EMA5utMGNCKj03p798w7fpTRfXI1MXUF0Bc9lEC8VBXmGY5i3L9gjECbL24Gp/rb hmW20uv3NTGxm7YTCl71JBN1pU9nYidqOJ6gNZAwiE/xUqEp8nBfESkgrtXw4yYdHZuw HtrFGor/Y81WEsK8zuBs6D26J9YtdJ3fSn54+PJgzMOx6ZhhZmoH0mLL48+r/dWzNaCB Te0g== 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=KIs8DmgA8AccLbWwMAtSCFc8vzsoyHnUEZeT3RkF2Lo=; b=PHFP59hJrZxwLwU/GAHUWsZHS9WR7F6GLCWYlJsQIRySQh3hJZFUdtoOaTp9l2ftPR l4BFNNWctQpI6/2Z9drFBSHwXgVg4OM1S8XcRwNl+fGh/x2bYi6EVK5lMMhVHRTTrVTj ZDvhX96dzvq5lyJHBKzC9YgvfibRaWQ0qs2Nr7KI3oCBs7bdFLFBlJ1El/wn8UqtIuaO xK3lpoALY1pJcyBwVvDIE8eFq4/DB/CasVaMsZf45rE2POXtbHutrMTt/nzdjG8+TIRx IQ+MkrpH11YUf70VSq1Wl25hhlioyhxzOURJwKdfgcFvuveq3AOc/CzhDIJvW2l/ERxZ 7aMg== X-Gm-Message-State: APjAAAV8smKVfKikCzwdQi+9eV0XSNUFghBcduZqQjoMBI/C8CYYqS6E FWInrc9KVeVreL+80DMuwRFjTIgzTRQ= X-Google-Smtp-Source: APXvYqx13uQp2NjFN9YbIpY1IPt11alK3LudddppJmNB/MhXceRbw/9vWng3sD8K12LazMH+StyE6w== X-Received: by 2002:a02:c7c9:: with SMTP id s9mr67356283jao.82.1560558986103; Fri, 14 Jun 2019 17:36:26 -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 c17sm3182180ioo.82.2019.06.14.17.36.24 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 17:36:25 -0700 (PDT) In-Reply-To: (tenspd's message of "Fri, 14 Jun 2019 17:14:26 -0600") 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:160588 Archived-At: Hi, "tenspd137 ." writes: > (defun thefile() "/EWS/Exchange.asmx") > > (copied from url-http library) > (defun url-http-create-request (&optional ref-url) > ..... > ;; This was done with a call to `format'. Concatenating parts has > ;; the advantage of keeping the parts of each header together and > ;; allows us to elide null lines directly, at the cost of making > ;; the layout less clear. > (setq request > (concat > ;; The request > (or url-http-method "GET") " " > (url-http--encode-string > (if using-proxy (thefile) real-fname)) <------------Changed this to "hardcode" the request as proof of concept Starting from your results I searched the web and turned up a Stack Overflow post [1] which pointed me to the wget source code: if (proxy #ifdef HAVE_SSL /* When using SSL over proxy, CONNECT establishes a direct connection to the HTTPS server. Therefore use the same argument as when talking to the server directly. */ && u->scheme != SCHEME_HTTPS #endif ) meth_arg = xstrdup (u->url); else meth_arg = url_full_path (u); I think that comment explains why the url connection to the HTTPS Exchange server is failing in your case. Applying the same logic in the location you found would give: 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)) " HTTP/" url-http-version "\r\n" ;; Version of MIME we speak "MIME-Version: 1.0\r\n" Can you try out that patch and a) see if url-retrieve-synchronously still works, and if so, b) see if Excorporate works through the proxy with it? Thanks, Thomas 1. https://stackoverflow.com/questions/20050052/what-is-the-correct-url-format-to-send-to-an-http-proxy-server