From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: David Engster Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jul 2012 18:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11981@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.134263711720994 (code B ref -1); Wed, 18 Jul 2012 18:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jul 2012 18:45:17 +0000 Received: from localhost ([127.0.0.1]:48896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrZFM-0005SZ-UF for submit@debbugs.gnu.org; Wed, 18 Jul 2012 14:45:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53357) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrZFJ-0005SR-FG for submit@debbugs.gnu.org; Wed, 18 Jul 2012 14:45:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrZ9N-0005Fj-2L for submit@debbugs.gnu.org; Wed, 18 Jul 2012 14:39:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,FROM_12LTRDOM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrZ9M-0005Ff-V9 for submit@debbugs.gnu.org; Wed, 18 Jul 2012 14:39:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrZ9I-0001zb-8a for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 14:39:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrZ9H-0005Ei-8J for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 14:39:00 -0400 Received: from randomsample.de ([83.169.19.17]:36255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrZ9G-0005Dw-Qc for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 14:38:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=eBvlcAA2KC2PvW7aqyoYm1d/jfkfNq257+WyfW0Di+E=; b=FPIG2R3piHnsHoDy+Zsx2fcKrcPHA3TvqmLNtVmhfywEeynIIgFWPDZ77Fh5IFALtU/BvhkNO0o5sDlJzye5Hkngv6Vrdh52D8ZaANGdU4qf8ef1we1VtIzT3dTis/0p; Received: from dslc-082-082-169-213.pools.arcor-ip.net ([82.82.169.213] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SrZ97-0000tK-87 for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 20:38:49 +0200 From: David Engster Date: Wed, 18 Jul 2012 20:38:48 +0200 Message-ID: <87eho8didj.fsf@engster.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) The function `url-http-parse-headers' temporarily disables all file name handlers to circumvent a bug where Tramp could kick in because the URL might look like a remote file (#6717). This is the offending snippet: ;; The filename part of a URL could be in remote file syntax, ;; see Bug#6717 for an example. We disable file name ;; handlers, therefore. (file-name-handler-alist nil)) However, this workaraound assumes that everything that gets afterwards in the `let'-section does not depend on file name handlers. However, this is not the case: `url-http-handle-authentication' is called which in turn calls the auth-source package. This package however supports encrypted authinfo files which have to be automatically decrypted through `auto-encryption-mode'. This, of course, works through file name handlers. Here's a backtrace from `auth-source-search' resulting from a call to `url-retrieve-synchronously' on a password-protected URL: auth-source-search(:max 1 :host "www.google.com:443" :port "https") url-do-auth-source-search("www.google.com:443" "https" :user) url-basic-auth([cl-struct-url "https" nil nil "www.google.com" 443 "/calendar/dav/MY-GOOGLE-ACCOUNT/events/" nil nil t nil t] t nil "Google CalDAV" (("realm" . "Google CalDAV") ("basic"))) url-get-authentication("https://www.google.com/calendar/dav/MY-GOOGLE-ACCOUNT/events/" "Google CalDAV" "basic" t (("realm" . "Google CalDAV") ("basic"))) url-http-handle-authentication(nil) [ ... ] url-http-parse-headers() url-http-chunked-encoding-after-change-function(500 507 7) url-http-generic-filter(#> "\n0\n\n") [ ... ] url-retrieve-synchronously("https://www.google.com/calendar/dav/MY-GOOGLE-ACCOUNT/events/") Note that after `url-http-parse-headers' the variable `file-name-handler-alist' is set to 'nil', thus when `auth-source-search' loads an encrypted authinfo.gpg file, it won't automatically get decrypted. -David From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jul 2012 06:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: David Engster Cc: 11981@debbugs.gnu.org Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.1342680082368 (code B ref 11981); Thu, 19 Jul 2012 06:42:01 +0000 Received: (at 11981) by debbugs.gnu.org; 19 Jul 2012 06:41:22 +0000 Received: from localhost ([127.0.0.1]:49348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrkQL-00005s-HJ for submit@debbugs.gnu.org; Thu, 19 Jul 2012 02:41:21 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:39374) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SrkQI-00005j-Fp for 11981@debbugs.gnu.org; Thu, 19 Jul 2012 02:41:20 -0400 Received: (qmail invoked by alias); 19 Jul 2012 06:35:06 -0000 Received: from p57BB9582.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.149.130] by mail.gmx.net (mp020) with SMTP; 19 Jul 2012 08:35:06 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/qVqRlwd7qKscjPcxz7xIP9q6YYXvXDSwnpGa3Pn iOj5FgOES2BHSF From: Michael Albinus References: <87eho8didj.fsf@engster.org> Date: Thu, 19 Jul 2012 08:35:04 +0200 In-Reply-To: <87eho8didj.fsf@engster.org> (David Engster's message of "Wed, 18 Jul 2012 20:38:48 +0200") Message-ID: <87394otg13.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) David Engster writes: > However, this workaraound assumes that everything that gets afterwards > in the `let'-section does not depend on file name handlers. However, > this is not the case: `url-http-handle-authentication' is called which > in turn calls the auth-source package. This package however supports > encrypted authinfo files which have to be automatically decrypted > through `auto-encryption-mode'. This, of course, works through file name > handlers. Does it work, if Tramp is disabled instead? --8<---------------cut here---------------start------------->8--- *** /usr/local/src/emacs/lisp/url/url-http.el.~109155~ 2012-07-19 08:29:53.339768264 +0200 --- /usr/local/src/emacs/lisp/url/url-http.el 2012-07-19 08:28:26.428326961 +0200 *************** *** 510,518 **** ;; other status symbols: jewelry and luxury cars (status-symbol (cadr (assq url-http-response-status url-http-codes))) ;; The filename part of a URL could be in remote file syntax, ! ;; see Bug#6717 for an example. We disable file name ! ;; handlers, therefore. ! (file-name-handler-alist nil)) (setq class (/ url-http-response-status 100)) (url-http-debug "Parsed HTTP headers: class=%d status=%d" class url-http-response-status) (when (url-use-cookies url-http-target-url) --- 510,517 ---- ;; other status symbols: jewelry and luxury cars (status-symbol (cadr (assq url-http-response-status url-http-codes))) ;; The filename part of a URL could be in remote file syntax, ! ;; see Bug#6717 for an example. We disable Tramp, therefore. ! (tramp-mode nil)) (setq class (/ url-http-response-status 100)) (url-http-debug "Parsed HTTP headers: class=%d status=%d" class url-http-response-status) (when (url-use-cookies url-http-target-url) --8<---------------cut here---------------end--------------->8--- > -David Best regards, Michael. From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jul 2012 09:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 11981@debbugs.gnu.org, David Engster Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.134268917116803 (code B ref 11981); Thu, 19 Jul 2012 09:13:01 +0000 Received: (at 11981) by debbugs.gnu.org; 19 Jul 2012 09:12:51 +0000 Received: from localhost ([127.0.0.1]:49521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srmmw-0004Mx-Sk for submit@debbugs.gnu.org; Thu, 19 Jul 2012 05:12:51 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:46908) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srmmu-0004Mq-7A for 11981@debbugs.gnu.org; Thu, 19 Jul 2012 05:12:49 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6J96YHo010227; Thu, 19 Jul 2012 05:06:35 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 35E79AECB4; Thu, 19 Jul 2012 04:55:54 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> Date: Thu, 19 Jul 2012 04:55:54 -0400 In-Reply-To: <87394otg13.fsf@gmx.de> (Michael Albinus's message of "Thu, 19 Jul 2012 08:35:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4283=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4283> : streams <787121> : uri <1169174> X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) >> However, this workaraound assumes that everything that gets afterwards >> in the `let'-section does not depend on file name handlers. However, >> this is not the case: `url-http-handle-authentication' is called which >> in turn calls the auth-source package. This package however supports >> encrypted authinfo files which have to be automatically decrypted >> through `auto-encryption-mode'. This, of course, works through file name >> handlers. > Does it work, if Tramp is disabled instead? I think I'd first like to better understand bug#6717: why do we take a local part of a URL, let it start with / and then pass it to file-name-directory? That sounds like a problem in itself. Stefan From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: David Engster Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jul 2012 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 11981@debbugs.gnu.org, Michael Albinus Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.134270265110563 (code B ref 11981); Thu, 19 Jul 2012 12:58:02 +0000 Received: (at 11981) by debbugs.gnu.org; 19 Jul 2012 12:57:31 +0000 Received: from localhost ([127.0.0.1]:49762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrqIN-0002kK-9M for submit@debbugs.gnu.org; Thu, 19 Jul 2012 08:57:31 -0400 Received: from randomsample.de ([83.169.19.17]:59715) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrqIK-0002kB-Gx for 11981@debbugs.gnu.org; Thu, 19 Jul 2012 08:57:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=RBiEOSeAd+O0arp4zQRcNn5seOwNVhdlpeMINxqFArg=; b=Cl5mBShCZjQXX6d18ulwuCx0d68w591EveZy3Ngcm9jXXOqkMgrfKH6dtNBU/yNSddQzaSxINlQmP6z/8Kpmvq4d44RnGvOJhh4SOOBHXLC6i+4Se4hPJZmMStQ0q+R/; Received: from ibookg4-c2.pc.gwdg.de ([134.76.4.219]) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SrqCH-0005do-LL; Thu, 19 Jul 2012 14:51:13 +0200 From: David Engster In-Reply-To: (Stefan Monnier's message of "Thu, 19 Jul 2012 04:55:54 -0400") References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin) Date: Thu, 19 Jul 2012 14:51:07 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Stefan Monnier writes: >>> However, this workaraound assumes that everything that gets afterwards >>> in the `let'-section does not depend on file name handlers. However, >>> this is not the case: `url-http-handle-authentication' is called which >>> in turn calls the auth-source package. This package however supports >>> encrypted authinfo files which have to be automatically decrypted >>> through `auto-encryption-mode'. This, of course, works through file name >>> handlers. >> Does it work, if Tramp is disabled instead? > > I think I'd first like to better understand bug#6717: why do we take > a local part of a URL, let it start with / and then pass it to > file-name-directory? That sounds like a problem in itself. I agree. I wonder which call to `file-name-directory' threw the error in the original report - the most likely candidate is `url-file-directory', which should simply be rewritten to not use `file-name-directory'. -David From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: David Engster Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jul 2012 14:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 11981@debbugs.gnu.org, Michael Albinus Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.134288147031049 (code B ref 11981); Sat, 21 Jul 2012 14:38:02 +0000 Received: (at 11981) by debbugs.gnu.org; 21 Jul 2012 14:37:50 +0000 Received: from localhost ([127.0.0.1]:55256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsaoY-00084k-50 for submit@debbugs.gnu.org; Sat, 21 Jul 2012 10:37:50 -0400 Received: from randomsample.de ([83.169.19.17]:43567) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsaoV-00084c-RC for 11981@debbugs.gnu.org; Sat, 21 Jul 2012 10:37:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=w5DnA4JDWvTjlJgXswLkcZgN9v644K7I2Juy5ALInYM=; b=OZrKlx8zgXbhOKtwQjLKmMvcmLFXzrnhCtjvvJZl2WlgnMa87JR4Lzwq43a6yGhw4JslWYZURNIniEIwfb9PQSJNYr6oBNQ2oQdFkuYlvYEjZF5UgmFQFN8kt5NY707b; Received: from dslc-082-083-063-098.pools.arcor-ip.net ([82.83.63.98] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SsaiF-0008Nd-JS; Sat, 21 Jul 2012 16:31:20 +0200 From: David Engster In-Reply-To: (David Engster's message of "Thu, 19 Jul 2012 14:51:07 +0200") References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) Date: Sat, 21 Jul 2012 16:31:18 +0200 Message-ID: <87d33p9oeh.fsf@engster.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) --=-=-= Content-Type: text/plain David Engster writes: > Stefan Monnier writes: >>>> However, this workaraound assumes that everything that gets afterwards >>>> in the `let'-section does not depend on file name handlers. However, >>>> this is not the case: `url-http-handle-authentication' is called which > >>>> in turn calls the auth-source package. This package however supports >>>> encrypted authinfo files which have to be automatically decrypted >>>> through `auto-encryption-mode'. This, of course, works through file name >>>> handlers. >>> Does it work, if Tramp is disabled instead? >> >> I think I'd first like to better understand bug#6717: why do we take >> a local part of a URL, let it start with / and then pass it to >> file-name-directory? That sounds like a problem in itself. > > I agree. I wonder which call to `file-name-directory' threw the error in > the original report - the most likely candidate is `url-file-directory', > which should simply be rewritten to not use `file-name-directory'. Patch attached. It even fixes another bug along the way: `url-file-(non)directory' would not work on hexified URLs. I'm not 100% sure this also fixes bug #6717; it might be that there's another file-* call lurking somewhere. -David --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=url-util-diff.patch === modified file 'lisp/url/url-util.el' --- lisp/url/url-util.el 2012-07-11 23:13:41 +0000 +++ lisp/url/url-util.el 2012-07-21 14:25:59 +0000 @@ -246,18 +246,24 @@ "Return the directory part of FILE, for a URL." (cond ((null file) "") - ((string-match "\\?" file) - (file-name-directory (substring file 0 (match-beginning 0)))) - (t (file-name-directory file)))) + ((string-match "\\(\\?\\|%3[fF]\\)" file) + (url-file-directory (substring file 0 (match-beginning 0)))) + ((string-match "\\(.*\\(/\\|%2[fF]\\)\\)" file) + (match-string 1 file)) + (t + ""))) ;;;###autoload (defun url-file-nondirectory (file) "Return the nondirectory part of FILE, for a URL." (cond ((null file) "") - ((string-match "\\?" file) - (file-name-nondirectory (substring file 0 (match-beginning 0)))) - (t (file-name-nondirectory file)))) + ((string-match "\\(\\?\\|%3[fF]\\)" file) + (url-file-nondirectory (substring file 0 (match-beginning 0)))) + ((string-match ".*\\(?:/\\|%2[fF]\\)\\(.*\\)" file) + (match-string 1 file)) + (t + ""))) ;;;###autoload (defun url-parse-query-string (query &optional downcase allow-newlines) --=-=-=-- From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Aug 2012 16:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: David Engster Cc: 11981@debbugs.gnu.org, Michael Albinus Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.134426935132524 (code B ref 11981); Mon, 06 Aug 2012 16:10:01 +0000 Received: (at 11981) by debbugs.gnu.org; 6 Aug 2012 16:09:11 +0000 Received: from localhost ([127.0.0.1]:37725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyPri-0008SW-Q6 for submit@debbugs.gnu.org; Mon, 06 Aug 2012 12:09:11 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53743) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyPrg-0008SO-7v for 11981@debbugs.gnu.org; Mon, 06 Aug 2012 12:09:08 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q76G1D1X013736; Mon, 6 Aug 2012 12:01:13 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id BFD90B41E3; Mon, 6 Aug 2012 12:01:13 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> <87d33p9oeh.fsf@engster.org> Date: Mon, 06 Aug 2012 12:01:13 -0400 In-Reply-To: <87d33p9oeh.fsf@engster.org> (David Engster's message of "Sat, 21 Jul 2012 16:31:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4302=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4302> : streams <795346> : uri <1185290> X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > @@ -246,18 +246,24 @@ > "Return the directory part of FILE, for a URL." > (cond > ((null file) "") > - ((string-match "\\?" file) > - (file-name-directory (substring file 0 (match-beginning 0)))) > - (t (file-name-directory file)))) > + ((string-match "\\(\\?\\|%3[fF]\\)" file) > + (url-file-directory (substring file 0 (match-beginning 0)))) Should %3F really be treated like a ? (i.e. a special char that delimits two different parts of a URL) rather than like "a normal ? character encoded so as not to delimit two different parts of a URL"? Stefan From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Aug 2012 17:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 11981@debbugs.gnu.org, Michael Albinus , David Engster Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.13442739859949 (code B ref 11981); Mon, 06 Aug 2012 17:27:02 +0000 Received: (at 11981) by debbugs.gnu.org; 6 Aug 2012 17:26:25 +0000 Received: from localhost ([127.0.0.1]:37818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyR4S-0002aQ-OO for submit@debbugs.gnu.org; Mon, 06 Aug 2012 13:26:24 -0400 Received: from mailout.melmac.se ([62.20.26.67]:60955) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyR4Q-0002aI-DX for 11981@debbugs.gnu.org; Mon, 06 Aug 2012 13:26:23 -0400 Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 10A2B9A5D for <11981@debbugs.gnu.org>; Mon, 6 Aug 2012 19:18:24 +0200 (CEST) Received: (qmail 1038 invoked by uid 89); 6 Aug 2012 17:18:12 -0000 Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 6 Aug 2012 17:18:12 -0000 Received: from anon-146-198.vpn.ipredator.se (anon-146-198.vpn.ipredator.se [93.182.146.198]) by coolsville.localdomain (Postfix) with ESMTPSA id B22F17FA06C; Mon, 6 Aug 2012 19:18:23 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Jan =?UTF-8?Q?Dj=C3=A4rv?= In-Reply-To: Date: Mon, 6 Aug 2012 19:18:21 +0200 Content-Transfer-Encoding: 7bit Message-Id: <557CA48A-899E-4DCA-A22F-46EF0AC3CEFA@swipnet.se> References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> <87d33p9oeh.fsf@engster.org> X-Mailer: Apple Mail (2.1278) X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Hello. 6 aug 2012 kl. 18:01 skrev Stefan Monnier: >> @@ -246,18 +246,24 @@ >> "Return the directory part of FILE, for a URL." >> (cond >> ((null file) "") >> - ((string-match "\\?" file) >> - (file-name-directory (substring file 0 (match-beginning 0)))) >> - (t (file-name-directory file)))) >> + ((string-match "\\(\\?\\|%3[fF]\\)" file) >> + (url-file-directory (substring file 0 (match-beginning 0)))) > > Should %3F really be treated like a ? (i.e. a special char that > delimits two different parts of a URL) rather than like "a normal ? > character encoded so as not to delimit two different parts of a URL"? > A normal non-delimiting ?. How else can one get a ? in to an URL? Jan D. From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: David Engster Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Aug 2012 15:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Cc: 11981@debbugs.gnu.org, Michael Albinus , Stefan Monnier Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.134478368317565 (code B ref 11981); Sun, 12 Aug 2012 15:02:02 +0000 Received: (at 11981) by debbugs.gnu.org; 12 Aug 2012 15:01:23 +0000 Received: from localhost ([127.0.0.1]:51445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0ZfO-0004ZG-V9 for submit@debbugs.gnu.org; Sun, 12 Aug 2012 11:01:23 -0400 Received: from randomsample.de ([83.169.19.17]:46243) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0ZfM-0004Z7-4d for 11981@debbugs.gnu.org; Sun, 12 Aug 2012 11:01:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=I3mAXke2euPcagJZI6udbmpcDkJJ+VKdxf3+ksC0lLo=; b=CLbXWicW6P+VLb8CeEfanvh38BuaMTvhbsfOA5uRTQPMWisrUOW+EBdDPjEH1rkCzNWgyS6ZaNUqKUmVFSVhc+mtpavRZoDLLXaDeAKlcZp6GIDru5pzdfDd/mw1U3Ou; Received: from dslc-082-083-047-214.pools.arcor-ip.net ([82.83.47.214] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1T0ZX8-00024M-6W; Sun, 12 Aug 2012 16:52:50 +0200 From: David Engster In-Reply-To: <557CA48A-899E-4DCA-A22F-46EF0AC3CEFA@swipnet.se> ("Jan \=\?iso-8859-1\?Q\?Dj\=E4rv\=22's\?\= message of "Mon, 6 Aug 2012 19:18:21 +0200") References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> <87d33p9oeh.fsf@engster.org> <557CA48A-899E-4DCA-A22F-46EF0AC3CEFA@swipnet.se> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) Date: Sun, 12 Aug 2012 16:52:47 +0200 Message-ID: <87y5lkcgcg.fsf@engster.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jan Dj=E4rv writes: > Hello. > > 6 aug 2012 kl. 18:01 skrev Stefan Monnier: > >>> @@ -246,18 +246,24 @@ >>> "Return the directory part of FILE, for a URL." >>> (cond >>> ((null file) "") >>> - ((string-match "\\?" file) >>> - (file-name-directory (substring file 0 (match-beginning 0)))) >>> - (t (file-name-directory file)))) >>> + ((string-match "\\(\\?\\|%3[fF]\\)" file) >>> + (url-file-directory (substring file 0 (match-beginning 0)))) >>=20 >> Should %3F really be treated like a ? (i.e. a special char that >> delimits two different parts of a URL) rather than like "a normal ? >> character encoded so as not to delimit two different parts of a URL"? >>=20 > > A normal non-delimiting ?. How else can one get a ? in to an URL? You are both right, of course; I was overcompensating. The match for %3[fF] must be removed. -David From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Aug 2012 17:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: David Engster Cc: 11981@debbugs.gnu.org, Jan =?UTF-8?Q?Dj=C3=A4rv?= , Michael Albinus Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.134479350331715 (code B ref 11981); Sun, 12 Aug 2012 17:46:02 +0000 Received: (at 11981) by debbugs.gnu.org; 12 Aug 2012 17:45:03 +0000 Received: from localhost ([127.0.0.1]:51571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0cDn-0008FU-2n for submit@debbugs.gnu.org; Sun, 12 Aug 2012 13:45:03 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:47708) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0cDl-0008Es-3g for 11981@debbugs.gnu.org; Sun, 12 Aug 2012 13:45:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxKJq/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCwsOJgcLFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195530637" Received: from 69-196-162-106.dsl.teksavvy.com (HELO pastel.home) ([69.196.162.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Aug 2012 13:36:32 -0400 Received: by pastel.home (Postfix, from userid 20848) id 974FD59305; Sun, 12 Aug 2012 13:36:31 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> <87d33p9oeh.fsf@engster.org> <557CA48A-899E-4DCA-A22F-46EF0AC3CEFA@swipnet.se> <87y5lkcgcg.fsf@engster.org> Date: Sun, 12 Aug 2012 13:36:31 -0400 In-Reply-To: <87y5lkcgcg.fsf@engster.org> (David Engster's message of "Sun, 12 Aug 2012 16:52:47 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > You are both right, of course; I was overcompensating. The match for > %3[fF] must be removed. Thanks, I installed your patch with this part adjusted (as well as the default case changed to better match file-name-(non)directory's behavior). Can we now re-enable file-name-handlers in url-http-parse-headers? Stefan From unknown Sat Aug 09 13:21:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Resent-From: David Engster Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Aug 2012 19:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11981 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 11981@debbugs.gnu.org, Jan =?UTF-8?Q?Dj=C3=A4rv?= , Michael Albinus Received: via spool by 11981-submit@debbugs.gnu.org id=B11981.134488631322430 (code B ref 11981); Mon, 13 Aug 2012 19:32:02 +0000 Received: (at 11981) by debbugs.gnu.org; 13 Aug 2012 19:31:53 +0000 Received: from localhost ([127.0.0.1]:54089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T10Mi-0005pi-Aj for submit@debbugs.gnu.org; Mon, 13 Aug 2012 15:31:53 -0400 Received: from randomsample.de ([83.169.19.17]:43743) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T10Me-0005pY-P0 for 11981@debbugs.gnu.org; Mon, 13 Aug 2012 15:31:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=8Mgir7Yi80isjRhIIbqZeUIjE3B6NktiWGy7CX6F51Y=; b=WY8e0TbAlFkPUfXsOyOira44GiDulofL/gVMYhiJKr7c6Zrsf/mwMpFIRLSk//Oyb8xme8YW0WUhGGvDCTGrBjmgFchQnb+drE/1dPhOzCAezGvkPkGBVNt91GQMFQnP; Received: from dslc-082-083-046-169.pools.arcor-ip.net ([82.83.46.169] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1T10EJ-0007Ji-2r; Mon, 13 Aug 2012 21:23:11 +0200 From: David Engster In-Reply-To: (Stefan Monnier's message of "Sun, 12 Aug 2012 13:36:31 -0400") References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> <87d33p9oeh.fsf@engster.org> <557CA48A-899E-4DCA-A22F-46EF0AC3CEFA@swipnet.se> <87y5lkcgcg.fsf@engster.org> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) Date: Mon, 13 Aug 2012 21:23:01 +0200 Message-ID: <87has638bu.fsf@engster.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Stefan Monnier writes: >> You are both right, of course; I was overcompensating. The match for >> %3[fF] must be removed. > > Thanks, I installed your patch with this part adjusted (as well as the > default case changed to better match file-name-(non)directory's > behavior). > Can we now re-enable file-name-handlers in url-http-parse-headers? I think so. I re-enabled the file-name-handlers, created a test feed with a colon in it http://www.randomsample.de/foo:bar.xml and I could subscribe to it with Gnus (the original URLs in Bug #6717 gave me http 405 errors). -David From unknown Sat Aug 09 13:21:59 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: David Engster Subject: bug#11981: closed (Re: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source) Message-ID: References: <87eho8didj.fsf@engster.org> X-Gnu-PR-Message: they-closed 11981 X-Gnu-PR-Package: emacs Reply-To: 11981@debbugs.gnu.org Date: Tue, 14 Aug 2012 15:05:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1344956702-24158-1" This is a multi-part message in MIME format... ------------=_1344956702-24158-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #11981: 24.1.50; url-http-parse-headers should not disable file name handle= rs since it breaks auth-source which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 11981@debbugs.gnu.org. --=20 11981: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11981 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1344956702-24158-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11981-done) by debbugs.gnu.org; 14 Aug 2012 15:04:22 +0000 Received: from localhost ([127.0.0.1]:56454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1IfO-0006Gp-H8 for submit@debbugs.gnu.org; Tue, 14 Aug 2012 11:04:22 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:59708) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1IfM-0006Gh-3O for 11981-done@debbugs.gnu.org; Tue, 14 Aug 2012 11:04:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCqqR/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDhYQBwsUGA0kiBwFC7l+kEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195657507" Received: from 76-10-170-145.dsl.teksavvy.com (HELO pastel.home) ([76.10.170.145]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 14 Aug 2012 10:55:40 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2F63659123; Tue, 14 Aug 2012 10:55:40 -0400 (EDT) From: Stefan Monnier To: David Engster Subject: Re: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Message-ID: References: <87eho8didj.fsf@engster.org> <87394otg13.fsf@gmx.de> <87d33p9oeh.fsf@engster.org> <557CA48A-899E-4DCA-A22F-46EF0AC3CEFA@swipnet.se> <87y5lkcgcg.fsf@engster.org> <87has638bu.fsf@engster.org> Date: Tue, 14 Aug 2012 10:55:39 -0400 In-Reply-To: <87has638bu.fsf@engster.org> (David Engster's message of "Mon, 13 Aug 2012 21:23:01 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11981-done Cc: 11981-done@debbugs.gnu.org, Jan =?iso-8859-1?Q?Dj=E4rv?= , Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> Can we now re-enable file-name-handlers in url-http-parse-headers? > I think so. I re-enabled the file-name-handlers, created a test feed > with a colon in it > http://www.randomsample.de/foo:bar.xml > and I could subscribe to it with Gnus (the original URLs in Bug #6717 > gave me http 405 errors). OK, re-enabled, then, thank you, Stefan ------------=_1344956702-24158-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Jul 2012 18:45:17 +0000 Received: from localhost ([127.0.0.1]:48896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrZFM-0005SZ-UF for submit@debbugs.gnu.org; Wed, 18 Jul 2012 14:45:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53357) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrZFJ-0005SR-FG for submit@debbugs.gnu.org; Wed, 18 Jul 2012 14:45:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrZ9N-0005Fj-2L for submit@debbugs.gnu.org; Wed, 18 Jul 2012 14:39:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,FROM_12LTRDOM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrZ9M-0005Ff-V9 for submit@debbugs.gnu.org; Wed, 18 Jul 2012 14:39:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrZ9I-0001zb-8a for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 14:39:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrZ9H-0005Ei-8J for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 14:39:00 -0400 Received: from randomsample.de ([83.169.19.17]:36255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrZ9G-0005Dw-Qc for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 14:38:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=eBvlcAA2KC2PvW7aqyoYm1d/jfkfNq257+WyfW0Di+E=; b=FPIG2R3piHnsHoDy+Zsx2fcKrcPHA3TvqmLNtVmhfywEeynIIgFWPDZ77Fh5IFALtU/BvhkNO0o5sDlJzye5Hkngv6Vrdh52D8ZaANGdU4qf8ef1we1VtIzT3dTis/0p; Received: from dslc-082-082-169-213.pools.arcor-ip.net ([82.82.169.213] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SrZ97-0000tK-87 for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 20:38:49 +0200 From: David Engster To: bug-gnu-emacs@gnu.org Subject: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Date: Wed, 18 Jul 2012 20:38:48 +0200 Message-ID: <87eho8didj.fsf@engster.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) The function `url-http-parse-headers' temporarily disables all file name handlers to circumvent a bug where Tramp could kick in because the URL might look like a remote file (#6717). This is the offending snippet: ;; The filename part of a URL could be in remote file syntax, ;; see Bug#6717 for an example. We disable file name ;; handlers, therefore. (file-name-handler-alist nil)) However, this workaraound assumes that everything that gets afterwards in the `let'-section does not depend on file name handlers. However, this is not the case: `url-http-handle-authentication' is called which in turn calls the auth-source package. This package however supports encrypted authinfo files which have to be automatically decrypted through `auto-encryption-mode'. This, of course, works through file name handlers. Here's a backtrace from `auth-source-search' resulting from a call to `url-retrieve-synchronously' on a password-protected URL: auth-source-search(:max 1 :host "www.google.com:443" :port "https") url-do-auth-source-search("www.google.com:443" "https" :user) url-basic-auth([cl-struct-url "https" nil nil "www.google.com" 443 "/calendar/dav/MY-GOOGLE-ACCOUNT/events/" nil nil t nil t] t nil "Google CalDAV" (("realm" . "Google CalDAV") ("basic"))) url-get-authentication("https://www.google.com/calendar/dav/MY-GOOGLE-ACCOUNT/events/" "Google CalDAV" "basic" t (("realm" . "Google CalDAV") ("basic"))) url-http-handle-authentication(nil) [ ... ] url-http-parse-headers() url-http-chunked-encoding-after-change-function(500 507 7) url-http-generic-filter(#> "\n0\n\n") [ ... ] url-retrieve-synchronously("https://www.google.com/calendar/dav/MY-GOOGLE-ACCOUNT/events/") Note that after `url-http-parse-headers' the variable `file-name-handler-alist' is set to 'nil', thus when `auth-source-search' loads an encrypted authinfo.gpg file, it won't automatically get decrypted. -David ------------=_1344956702-24158-1--