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: Tue, 09 Jul 2019 20:11:40 -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="39140"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Andreas Schwab , 35969@debbugs.gnu.org To: Collin Day Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 10 02:12:38 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 1hl0Ds-000A2Y-Lj for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jul 2019 02:12:36 +0200 Original-Received: from localhost ([::1]:57042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl0Dr-0007ZY-Jk for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 20:12:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54750) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl0DQ-0007V0-V9 for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 20:12:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hl0DL-0005di-8u for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 20:12:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53995) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hl0DK-0005c3-0C for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 20:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hl0DJ-0001Zs-PD for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 20:12: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: Wed, 10 Jul 2019 00:12: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.15627175106045 (code B ref 35969); Wed, 10 Jul 2019 00:12:01 +0000 Original-Received: (at 35969) by debbugs.gnu.org; 10 Jul 2019 00:11:50 +0000 Original-Received: from localhost ([127.0.0.1]:34583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hl0D7-0001ZQ-JD for submit@debbugs.gnu.org; Tue, 09 Jul 2019 20:11:50 -0400 Original-Received: from mail-io1-f66.google.com ([209.85.166.66]:35658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hl0D5-0001ZC-K1 for 35969@debbugs.gnu.org; Tue, 09 Jul 2019 20:11:48 -0400 Original-Received: by mail-io1-f66.google.com with SMTP id m24so894285ioo.2 for <35969@debbugs.gnu.org>; Tue, 09 Jul 2019 17:11:47 -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=y9NpPXg62IUREgQ/nqtdtKWQWvUK7J+QaOwxgXRiWYM=; b=xpOPLCcYlRjOiDv87C5Ca6QXxHPbLcioIkGelnh/3alUxwZQk1yZD6nb6Krw1VSOYE F8RQk2UgBipxfH7UC1R5d5FKje75+t6Cmupu5IqbzzEBinszYh7cuCQVUIvTnN4vNrUR hgtnSOCejobUj6hQ8Q0RK5s+hSmaXosMoqim+gBgS0i8qNRQybx8YFt8Nc6i1yBSK5M1 +Dr4aW/i3jRMzoQ9CVigfWODzp7qonqaEWm4lrSxJnNbCDc7EQp/f69Dam4sVx8exbQZ puSDxJQTwnXlEWiYEHod3+ELvQuSctrAu77HjF14wD+inMLU7JvLGBy5duqg9+Opu8UP FDjA== 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=y9NpPXg62IUREgQ/nqtdtKWQWvUK7J+QaOwxgXRiWYM=; b=gYMXDK+dJUh30BQtA2fCNq/Z3myE3NpkXMCfpQ1LGMGx0HQQNguccg9sR6bXZA6icu YeVnuixfW98BTSK/0Gm3v8k8D64jAk81xHMN2Ia18eJSky+TrpdvVmiNac9z8LXU05wU fgg59E9OnYEcJ3vccK7sCeXwAzDVCnnyxj8GwY65A1zYE2yk+AGPG/eLjwTOBll2g2FK krEaGSmHC5cz6kNGP3Lovtd5qV6BOjWXB6QVJLcKlJAlBGVr78tDBGDyVl5OYi+qHq/k NMLe0/qLWK3MCA1w2QyUIns1dQkJuiCwgybM+lJYF5/O6gMKtVoBTOtg8EBlH0nvfHIi ejyQ== X-Gm-Message-State: APjAAAXaEgs4gcFjGdFKTWb5HEhlkXzhOQtCcuG0tWPeKLFLBd4e8KHK ncB9OkPfml2NLIRVev/yD334Y7xd2yQ= X-Google-Smtp-Source: APXvYqwy7SDNYRJD1LEPiUTuoFt18S8NqBUUVj1fXPs9A621Nr7IkYUPXFU598Lqok6v2C1tpSY3Ag== X-Received: by 2002:a6b:8f47:: with SMTP id r68mr23107657iod.204.1562717501777; Tue, 09 Jul 2019 17:11:41 -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 t133sm567629iof.21.2019.07.09.17.11.40 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jul 2019 17:11:41 -0700 (PDT) In-Reply-To: (Thomas Fitzsimmons's message of "Tue, 09 Jul 2019 20:08:50 -0400") 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:162582 Archived-At: I think there should be no need to remove test-home, so you won't have to re-run the M-x package-install steps. Thomas Thomas Fitzsimmons writes: > OK, can you apply my patch, then run "make" again and confirm it works? > > Thanks, > Thomas > > Collin Day writes: > >> Did a git pull and followed instructions above. >> >> There are some issues. First, I need to run M-x package-install >> excorporate four times because I see (each line after each >> invocation) >> >> package--with-response-buffer-1: >> https://elpa.gnu.org/packages/url-http-ntlm-2.0.4.el: Method not >> allowed >> package--with-response-buffer-1: >> https://elpa.gnu.org/packages/fsm-0.2.1.el: Method not allowed >> package--with-response-buffer-1: >> https://elpa.gnu.org/packages/excorporate-0.8.3.tar: Method not >> allowed >> >> After the 4th call it compiles and becomes available. >> >> M-x customize-group excorporate, set up for no autoconfig right >> now, hit apply for current sessions, save not availiable.... >> >> M-x excorporate >> >> enter uname and password >> >> Contacting host: outlook.office365.com:443 >> error in process filter: exco--parse-xml-in-current-buffer: Server >> response is not an XML document >> error in process filter: Server response is not an XML documen >> >> *http outlook.office.365.com:443* > > [...] > >> So it appears not to work, at least on the current head as of today.... >> >> Thanks! >> >> -C >> >> On Tue, Jul 9, 2019 at 4:09 PM Collin Day wrote: >>> >>> Sorry, I have not had the chance to. A lot has been going on at my >>> place of employment. It has crossed my mind, and as soon as I have >>> a chance, I will try what you suggested above. Thanks, sorry for >>> the inconvenience. >>> >>> On Tue, Jul 9, 2019, 3:53 PM Thomas Fitzsimmons wrote: >>>> >>>> Hi, >>>> >>>> Were you able to complete building Emacs? I'd like to know if my patch >>>> is needed on top of Andreas's to make Excorporate work through your >>>> proxy. >>>> >>>> I'm not sure why the built version would interfere with the current >>>> installation. If you were doing "make install" to a common prefix, that >>>> might explain it. Instead you can try something like this: >>>> >>>> cd emacs-master [your github.com checkout] >>>> make >>>> mkdir test-home >>>> HOME=`pwd`/test-home ./src/emacs -Q >>>> >>>> That will ensure you're only running the built Emacs, and completely >>>> ignoring the packages installed in your home directory. >>>> >>>> Thomas >>>> >>>> "tenspd137 ." writes: >>>> >>>> > I haven't tried the first item on the list yet - ie reloading Andreas' >>>> > function. i have tried to build emacs from >>>> > https://github.com/emacs-mirror/emacs.git because I can't reach the >>>> > official repo from my firewall for whatever reason. I am sure it is >>>> > something here. Anyway, I was having problems because my built >>>> > version (27.0.x) was getting seemingly mixed up with my current >>>> > installation. I can try again later, but right now things are pretty >>>> > busy at work. >>>> > >>>> > Thanks. >>>> > >>>> > On Tue, Jun 18, 2019 at 10:26 PM Thomas Fitzsimmons wrote: >>>> >> >>>> >> Hi, >>>> >> >>>> >> "tenspd137 ." writes: >>>> >> >>>> >> > So - I am not sure if I did it correctly, but I copied this function >>>> >> > with Andreas' changes into a file: >>>> >> > >>>> >> > (defun url-https-proxy-after-change-function (_st _nd _length) >>>> >> > (let* ((process-buffer (current-buffer)) >>>> >> > (proc (get-buffer-process process-buffer))) >>>> >> > (goto-char (point-min)) >>>> >> > (when (re-search-forward "^\r?\n" nil t) >>>> >> > (backward-char 1) >>>> >> > ;; Saw the end of the headers >>>> >> > (setq url-http-end-of-headers (set-marker (make-marker) (point))) >>>> >> > (url-http-parse-response) >>>> >> > (cond >>>> >> > ((null url-http-response-status) >>>> >> > ;; We got back a headerless malformed response from the >>>> >> > ;; server. >>>> >> > (url-http-activate-callback) >>>> >> > (error "Malformed response from proxy, fail!")) >>>> >> > ((= url-http-response-status 200) >>>> >> > (if (gnutls-available-p) >>>> >> > (condition-case e >>>> >> > (let ((tls-connection (gnutls-negotiate >>>> >> > :process proc >>>> >> > :hostname (url-host url-current-object) >>>> >> > :verify-error nil))) >>>> >> > ;; check certificate validity >>>> >> > (setq tls-connection >>>> >> > (nsm-verify-connection tls-connection >>>> >> > (url-host url-current-object) >>>> >> > (url-port url-current-object))) >>>> >> > (with-current-buffer process-buffer (erase-buffer)) >>>> >> > (set-process-buffer tls-connection process-buffer) >>>> >> > (setq url-http-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)))) >>>> >> > (gnutls-error >>>> >> > (url-http-activate-callback) >>>> >> > (error "gnutls-error: %s" e)) >>>> >> > (error >>>> >> > (url-http-activate-callback) >>>> >> > (error "error: %s" e))) >>>> >> > (error "error: gnutls support needed!"))) >>>> >> > (t >>>> >> > (url-http-debug "error response: %d" url-http-response-status) >>>> >> > (url-http-activate-callback)))))) >>>> >> > >>>> >> > and then loaded it before running excorporate. After that, I did M-x >>>> >> > excorporate, and the minibuffer returns: error in process filter: >>>> >> > Server response is not an XML document >>>> >> >>>> >> In this scenario, if you immediately (without restarting Emacs/reloading >>>> >> anything) re-run M-x excorporate does it still fail? I just want to >>>> >> make sure that's not a transient failure. If it does fail the second >>>> >> time, can you post the HTTP response from the server? >>>> >> >>>> >> > When I do the similar test by loading the url-http-create-request with >>>> >> > Thomas's changes, I can get a connection and grab my schedule >>>> >> > through the proxy. >>>> >> >>>> >> OK. >>>> >> >>>> >> > Let me know if I need to try something different. >>>> >> >>>> >> Are you in a position to build Emacs master tip and retry the experiment >>>> >> without patching anything? >>>> >> >>>> >> Thanks, >>>> >> Thomas >>>> >> >>>> >> > On Mon, Jun 17, 2019 at 4:08 PM Thomas Fitzsimmons wrote: >>>> >> >> >>>> >> >> Hi, >>>> >> >> >>>> >> >> Good to hear that the patch I posted worked! >>>> >> >> >>>> >> >> Yes, that's the patch that Andreas's commit >>>> >> >> 84613dae5c34ea742dd9a3e56f5acb55f604b483 applied. From what I can tell, >>>> >> >> you will not have that in Emacs 26.2. >>>> >> >> >>>> >> >> Can you try reverting my patch and applying Andreas's patch, and see if >>>> >> >> Excorporate still works through the proxy? >>>> >> >> >>>> >> >> Thanks, >>>> >> >> Thomas >>>> >> >> >>>> >> >> "tenspd137 ." writes: >>>> >> >> >>>> >> >> > The patch Thomas seems to work from behind the proxy. My current >>>> >> >> > emacs version is 26.2, so I would think it would include the commit >>>> >> >> > Andreas is talking about.... I went and looked it up - is this the >>>> >> >> > correct commit? >>>> >> >> > >>>> >> >> > diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el >>>> >> >> > index 53798f7..817c5ce 100644 >>>> >> >> > --- a/lisp/url/url-http.el >>>> >> >> > +++ b/lisp/url/url-http.el >>>> >> >> > @@ -1412,7 +1412,9 @@ The return value of this function is the >>>> >> >> > retrieval buffer." >>>> >> >> > 'url-http-wait-for-headers-change-function) >>>> >> >> > (set-process-filter tls-connection 'url-http-generic-filter) >>>> >> >> > (process-send-string tls-connection >>>> >> >> > - (url-http-create-request))) >>>> >> >> > + ;; Use the non-proxy form of the request >>>> >> >> > + (let (url-http-proxy) >>>> >> >> > + (url-http-create-request)))) >>>> >> >> > (gnutls-error >>>> >> >> > (url-http-activate-callback) >>>> >> >> > (error "gnutls-error: %s" e)) >>>> >> >> > >>>> >> >> > Thanks! >>>> >> >> > >>>> >> >> > -C >>>> >> >> > >>>> >> >> > >>>> >> >> > On Sat, Jun 15, 2019 at 1:41 AM Andreas Schwab wrote: >>>> >> >> >> >>>> >> >> >> On Jun 14 2019, Thomas Fitzsimmons wrote: >>>> >> >> >> >>>> >> >> >> > 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)) >>>> >> >> >> >>>> >> >> >> That should already be handled by commit 84613dae5c. >>>> >> >> >> >>>> >> >> >> Andreas. >>>> >> >> >> >>>> >> >> >> -- >>>> >> >> >> Andreas Schwab, schwab@linux-m68k.org >>>> >> >> >> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 >>>> >> >> >> "And now for something completely different."