From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "tenspd137 ." Newsgroups: gmane.emacs.bugs Subject: bug#35969: 26.2, Excorporate Date: Fri, 14 Jun 2019 14:13:46 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="221513"; mail-complaints-to="usenet@blaine.gmane.org" To: Thomas Fitzsimmons , 35969@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 14 22:15:17 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 1hbsbV-000vOR-Ct for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2019 22:15:17 +0200 Original-Received: from localhost ([::1]:55038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbsbT-00031X-9f for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2019 16:15:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54202) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbsbJ-0002zR-Ty for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 16:15:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbsbI-0000aH-Fl for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 16:15:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52571) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbsbI-0000a2-BT for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 16:15:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hbsbF-0008Lx-VO for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 16:15:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "tenspd137 ." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jun 2019 20:15: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.156054324832024 (code B ref 35969); Fri, 14 Jun 2019 20:15:01 +0000 Original-Received: (at 35969) by debbugs.gnu.org; 14 Jun 2019 20:14:08 +0000 Original-Received: from localhost ([127.0.0.1]:37882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbsaL-0008KO-NA for submit@debbugs.gnu.org; Fri, 14 Jun 2019 16:14:06 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:37798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbsaJ-0008Ji-Bj for 35969@debbugs.gnu.org; Fri, 14 Jun 2019 16:14:04 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id f17so960232wme.2 for <35969@debbugs.gnu.org>; Fri, 14 Jun 2019 13:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=oN+cGxdXAl6fUyukg3kD2ocvz1sONDEl3iwXyS3i2EQ=; b=CLPRFaCo2aJdd8ucRs1k8KO/pwSxSFI89vjFMmOxowDphBx7jMvVjrnaSGjoonwbh7 e/6881613TyrDjdw908iqUwFPowlm+XOMcZ1JrKLaYbMqf5k5ywmtYrwD8VhHrUgmdwV WhiKuctrlKWApuCFWt+RRFNdR/stHrpOHQVHlOoRnj35fHUkdaUyKrnFsCzl4O5EoJbI wF8TfHIaDgbOSu9X1zTbXJAsFsbMEy9whgdX8AY6IocKnwsfTCki5hCj1FMfvp/scnEy 67IPjnT/9BSURm02OU7i3HJOaipSvJPVOW+PT4007YwzDR5iqGkaRsc6EWJR/juhFoP6 w8bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=oN+cGxdXAl6fUyukg3kD2ocvz1sONDEl3iwXyS3i2EQ=; b=mpMY7TG7Dzqe/BQz2z0YaK62cticgEh0Zoiks0eIfcoJ8jNzq/zZv+aZir8a9Effau RlhBUpU6xolESeyURCAm2sC1hRvvdIcXgs9O4L5+nfiLkJBFQYzAqBMnfpo+y+5A81vU lt5VsHKM70oc/nKMczO31KQJE4sPpdv5nnxEwqZYBrJ32Nkn3m+WGzcfZMQZmTD5AK2u j2/ykKIEKhY34JCR5CkFeZQ/JgyRH9f63lMdm91FekTEcidUxVyZG1EeNjagTwkQ/yIL YjIFNx9bXZkVcMouZFrHwKt9gMrV3M4Lk8K1HYv5AqIz4m8khtUTfd/eHNu1+A6/lhFN v34g== X-Gm-Message-State: APjAAAXqeohJniJKRPITCUWfO9BuhATvMjjH3a3pX7EJc+Uhkyoj5mos 4j+qYu9DZajD44MFLViwIASD6LYHXJ4LTxcp7Wo= X-Google-Smtp-Source: APXvYqyW4thgG2kvl9awiqlm3Viy8gIbbUhcPqTymI1XHWmi0adSfhKfU/c7evWfipnBVS8nf2n4e6Vu6dn5KDqWnA8= X-Received: by 2002:a7b:c450:: with SMTP id l16mr9636814wmi.0.1560543237374; Fri, 14 Jun 2019 13:13:57 -0700 (PDT) In-Reply-To: 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:160576 Archived-At: Thomas - I was able to try stepping through an Emacs/proxy/Exchange test in an emacs -Q session. After setting the proxy and configuring the debugger to step through url-http and url-http-async-sentilnel, the only thing I noticed is that it appears url-http-async-sentinel is not being called. I also put the url-https-proxy-connect override you gave me earlier into a file, loaded it and set the debugger to run through that as well as set up proxies. A broken down list of steps: 1. Load file containing proxy and altered url-https-proxyconnect, set debugger to run through it when hit. 2. set up url-http and url-http-async-sentinel to be picked up by debugger 3. eval (url-retrieve-synchronously "https://outlook.office365.com/EWS/Exchange.asmx"), step through url-http 4. Input username and password when asked 5. Continue stepping until end url-http-async-sentinel is never called. " *http* ... -####" has text indicating failure. url-https-proxy-connect is indeed called. I don't know how to look at the actual , if I try to C-x C-e or M-: "connection", it goes into the debugger. The url's, etc look good as far as I can tell. Not sure what else I can do. If there are certain pieces of url-http you want me to look at, just let me know, but not really knowing what has to happen under the hood, I am not going to be able to do much else. Thanks! -C On Tue, Jun 4, 2019 at 4:28 PM Thomas Fitzsimmons wrote: > > "tenspd137 ." writes: > > > Oh - I see. Because you want to look at the *HEADERS* flying around > > in that case. Understood. > > Right. > > > Quick question - using emacs -Q on my proxied machine > > > > (setq url-http-proxy "myproxy") doesn't seem to work, so I have been just doing: > > > > (setq url-proxy-services '(("http" . "myproxy") > > ("https" . "myproxy"))) > > > > then, I evaluate: > > > > (defun url-https-proxy-connect (connection) > > (setq url-http-after-change-function 'url-https-proxy-after-change-function) > > (message "THIS WAS CALLED: url-https-proxy-connect") > > (process-send-string connection (format (concat "CONNECT %s:%d HTTP/1.1\r\n" > > "Host: %s\r\n" > > "\r\n") > > (url-host url-current-object) > > (or (url-port url-current-object) > > url-https-default-port) > > (url-host url-current-object)))) > > > > which, if I understand correctly, adds the messaging to the orgiinal > > url-https-proxy-connect. > > That's correct. > > > Then I evaluate > > > > (url-retrieve-synchronously "https://outlook.office365.com/EWS/Exchange.asmx") > > > > after sending username and password, THIS WAS CALLED does not appear > > in the messages. Am I using it correctly, or is this not being > > called? I have to ask, because at this point in my emacs usage, I > > always bet first that I have done something wrong. > > I think you're doing everything correctly, so this suggests that Emacs > isn't doing any proxy handling, or at least that it is not initiating > the "CONNECT" protocol. > > From the wget output in your other email, it shows wget > connecting to the proxy with CONNECT. This protocol keeps the TLS > "tunnel" through the proxy open, and as far as I know, is required for > Exchange authentication to work through a proxy. > > Then the logs also show: > > Connection: Keep-Alive > Proxy-Connection: Keep-Alive > > which are important; even when you set Connection keep-alive, Emacs was > still sending both Connection close and Connection keep-alive which is > probably not valid. > > You may have reached the limit of what Emacs can currently do for > proxies, but it's up to someone (maybe me) to eventually implement > CONNECT properly if it isn't already. > > A next step would be to repeat your Emacs/proxy/Exchange experiments > until you get url-https-proxy-connect to be called or figure out why it > isn't being called. > > The only two callers are url-http and url-http-async-sentinel. To step > through them with edebug do: > > C-h f url-http RET C-x o TAB RET C-u C-M-x > > Likewise for url-http-async-sentinel, then redo your experiment and step > through the functions with SPC and eval stuff with C-x e to see where > they go off the rails before calling url-https-proxy-connect. > > > Still looking into wget verbosity.... > > I saw the other email, nice; is that output just with the -d option? > > BTW, it seems like Emacs is supposed to read the _proxy environment > variables the way wget does. Have you tried running emacs -Q in an > environment that has http_proxy and https_proxy set, and then not > setting any of the Emacs proxy variables and doing the Exchange > authentication experiment? > > Thanks, > Thomas