From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#62598: 29.0.60; url-https-proxy-connect doesn't support multi-stage auth to proxies Date: Sat, 01 Apr 2023 16:28:39 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36480"; mail-complaints-to="usenet@ciao.gmane.io" To: 62598@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 01 22:29:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pihqi-0009GT-3r for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Apr 2023 22:29:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pihqR-0004Sa-Cf; Sat, 01 Apr 2023 16:29:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pihqQ-0004SD-CL for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 16:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pihqQ-0000bp-4Z for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 16:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pihqP-0008QD-P8 for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 16:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Apr 2023 20:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62598 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168038092532347 (code B ref -1); Sat, 01 Apr 2023 20:29:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Apr 2023 20:28:45 +0000 Original-Received: from localhost ([127.0.0.1]:38650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pihq8-0008Pf-MO for submit@debbugs.gnu.org; Sat, 01 Apr 2023 16:28:44 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:39976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pihq6-0008PX-Qg for submit@debbugs.gnu.org; Sat, 01 Apr 2023 16:28:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pihq6-0004Rd-D8 for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 16:28:42 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pihq4-0000bF-QL for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 16:28:41 -0400 Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259074 Archived-At: url-http knows how to use HTTPS proxies, primarily in url-https-proxy-connect. It even knows to authenticate to those proxies, as fixed in bug#42422. But some HTTP authentication methods (e.g. NTLM as supported by url-http-ntlm) require multiple stages of back-and-forth in authentication. This works fine with regular HTTP requests and requests to HTTP (non-S) proxies; it's handled by url-http-handle-authentication which is called by url-http-parse-headers when it sees a 401 or 407 (auth required and proxy auth required) status. But this does not work with the HTTPS proxy support, because if it sees 401 or 407 as a response to CONNECT, it just immediately fails. I'm very interested in adding this but I'm unsure how to approach it. I guess that url-https-proxy-after-change-function should be calling something similar to url-http-handle-authentication. Or maybe the whole design of how HTTPS proxy support works today is wrong, and it should be calling url-http-parse-headers like everything else?