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: Tue, 18 Jun 2019 10:34: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="3261"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Andreas Schwab , 35969@debbugs.gnu.org To: Thomas Fitzsimmons Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 18 19:07:41 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 1hdHa8-0000el-Ul for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jun 2019 19:07:41 +0200 Original-Received: from localhost ([::1]:60238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdHa7-0002jp-UN for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jun 2019 13:07:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55561) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdH4e-0005wI-B2 for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2019 12:35:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdH4a-0000xU-As for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2019 12:35:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60182) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdH4Z-0000uL-2C for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2019 12:35:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hdH4Y-0007hU-VY for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2019 12:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "tenspd137 ." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2019 16:35: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.156087566429497 (code B ref 35969); Tue, 18 Jun 2019 16:35:02 +0000 Original-Received: (at 35969) by debbugs.gnu.org; 18 Jun 2019 16:34:24 +0000 Original-Received: from localhost ([127.0.0.1]:45489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hdH3w-0007fg-9U for submit@debbugs.gnu.org; Tue, 18 Jun 2019 12:34:24 -0400 Original-Received: from mail-wm1-f65.google.com ([209.85.128.65]:34972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hdH3u-0007fL-Iu for 35969@debbugs.gnu.org; Tue, 18 Jun 2019 12:34:23 -0400 Original-Received: by mail-wm1-f65.google.com with SMTP id c6so3966516wml.0 for <35969@debbugs.gnu.org>; Tue, 18 Jun 2019 09:34: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 :cc; bh=BPXKQmxX7a+3wQzZBJ67jjV4Ul9e1rnS0kmbkDXyj4o=; b=Dzn6NXM2o9U+/2NTAj5jQ9lpH35ZylK3txp+YULvHH1Z0Y5bubD3ra87VfSsk5aJPM tjJNDUJDg5xVtAPJmaDagp50DH+SQM3GlA6HogKX7ssixwokAKIRWeHOXp5XfSBk8P72 t5CPu+KqMaaVWPusYMZ1mo28rItbnYQJw368rlyTeBG1ryrwMmBzYNCVPF9RjasEDb1+ 3yGBN2agmgfEAmM7yBV8fIVyJbUk7bP2iGbtR8LALlao8KoXa650T3mEIJwgp/+alJkA mxwaX9dm2fKs0nzsGGhYuhj7U2tIOwFuoQ39ulpgaoM5QB8PEBjatd65+rAbFY2WM584 0Y1Q== 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:cc; bh=BPXKQmxX7a+3wQzZBJ67jjV4Ul9e1rnS0kmbkDXyj4o=; b=VcWLluDss2dyoEzvjSNO1MFA9mUF6KDQ3vAnvWfs2+AfidBc2I/tJIzViXAOWg68PR 3la5K0pWC5eFuwCkJARaEu/NyNHlrQAbeMoQjGhbmg6ZVTeB5hoIQEyGkKnq7rMNAuVc XVa8MXfhsg+gHwW+EUmy4kFYKugj72rPNQnqgApBGJqgQbgaK3LXa4Y/zcjrw633bRiI v4Ypx89j2yxEsGznCHPTdzKEpEMXMWvvmTT7Wvd3/+NWcZOC6plvCA6X712HkjEeBo4i 6dusAgs4QmLvmCymvizKNlhlc7WnOGgOFAV1abHAVLOdKIGFxwSZfNKvO2rvj5Lot9wZ SYkg== X-Gm-Message-State: APjAAAUi6SjfXrJNTLL/HYXxNY/O03b1KJM9p4rVwYcZG2bYhmhFZFyK SBC4QApvG6H9umgAmLzHpLGaaTnlukxqEG62zx8= X-Google-Smtp-Source: APXvYqxS8f0CB0J63KCIKAQpU5gODrB0VDF17qrpQLRreyVPYtu4u4c3hEIRXqOcwccqb4Y2Tw56HKUPDXtIKtT12Rw= X-Received: by 2002:a7b:c450:: with SMTP id l16mr4665077wmi.0.1560875656448; Tue, 18 Jun 2019 09:34: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:160778 Archived-At: 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 When I do the similar test by loading the url-http-create-request with Thiomase's changes, I can get a connection and grab my schedule through the proxy. Let me know if I need to try something different. Thanks! -C 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."