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:16:05 -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="231523"; 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:17:34 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 1hbsdg-000y4M-HN for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2019 22:17:32 +0200 Original-Received: from localhost ([::1]:55048 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbsdf-0004FR-I0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2019 16:17:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54760) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbsdM-00041Q-VH for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 16:17:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbsdK-0002Qj-5I for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 16:17:12 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52575) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbsdB-0002Hx-U4 for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 16:17:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hbsdB-0008Pc-OF for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 16:17:01 -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:17: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.156054338532277 (code B ref 35969); Fri, 14 Jun 2019 20:17:01 +0000 Original-Received: (at 35969) by debbugs.gnu.org; 14 Jun 2019 20:16:25 +0000 Original-Received: from localhost ([127.0.0.1]:37886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbsca-0008OW-Ma for submit@debbugs.gnu.org; Fri, 14 Jun 2019 16:16:25 -0400 Original-Received: from mail-wr1-f44.google.com ([209.85.221.44]:39973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbscY-0008OJ-Ia for 35969@debbugs.gnu.org; Fri, 14 Jun 2019 16:16:23 -0400 Original-Received: by mail-wr1-f44.google.com with SMTP id p11so3780547wre.7 for <35969@debbugs.gnu.org>; Fri, 14 Jun 2019 13:16:22 -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=YcbfneTJkGpMVya3D0H+UszQOAWiooifBy7hclxvdcI=; b=vDVA9P4UTDy3Yx1A+S2V7TusR2mtb+dN4trHPHxu7z2JUxO4QpfFhFMuXcKkOfYLGy Dxjorz0yguaoczzv5oeZLME7+z/Qci3F03GCl6nFxjG9G736x1JO5C32mSoOO4zOhANq 8CWPjEr07MH75JtgxgSWG1Twww0fYwKx4itZ2E7vWYh8mKONM9AG/Hecigsl2MHGajcQ FgjJafUUB/LPmGlztS1ExRKbod+dBvQrvNBmWqrN6u/GmVdv7GtBsvXOIEXc18PbtkfA 1ULfUDZ1qCSVeMzu6saHAJ7bxNxkvnib8732qXVZ9vxt9Wr+qi/uPaaPf+eTndhhMr1i ufmA== 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=YcbfneTJkGpMVya3D0H+UszQOAWiooifBy7hclxvdcI=; b=f2daLDEYPF/bRHOVVx88U3pej7JatONbpNDwJp0pg8x7mF3MVZjvTuQWcXPkTWKGSh hd6flnPYFgh4dGm5JL9bmgkDWqbgFezkVFLZj+ekNua0B4cf83mOU6D3tqniP8+afYJJ KO1ZAaCXBMbntqd14570PLCm7xzyoDtfpK+ie2O1+crd4/GjVdgE1hshV7tc0KWOUlD2 mE9zd6+RIe4dW8AHwlQ9fIveIGxpZm3ziMLk0BtQ8ecyNAzY5sdV/PLrF/oSlLcTHXOy WvD4vmue7uL1m11oz57Vo7pr0Gjm/6X3mOqo2+AdpICVpvSLpxDuEKkaKITGqfq82t7r xHSA== X-Gm-Message-State: APjAAAUGE+m+yM8ICENTx8fplmBHezkCTgOtCX9aMfpkost0Mqm9J1Ku 7irTRQedhqz3Z7XsndHP1dqGbqX55PH/bHrKgio= X-Google-Smtp-Source: APXvYqy9VXa1gzxlu5aMv3SB6bkOWgK6e9B0jGpoC4wqnsrAvK20plIdk2+ETluRscjl7M+iFBFltQHH4DbBzjCQIes= X-Received: by 2002:a5d:5692:: with SMTP id f18mr7650503wrv.104.1560543376563; Fri, 14 Jun 2019 13:16:16 -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:160577 Archived-At: *if I try to C-x C-e or M-: "connection", it goes into the debugger.* I mean it gives me a backtrace telling me the variable is empty, even though later in lisp expressions, it is evaluated. I am assuming it is roughly equivalent to a C++ pointer, but I don't know how to query it, etc. Thanks! -C On Fri, Jun 14, 2019 at 2:13 PM tenspd137 . wrote: > > 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