From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#62598: 29.0.60; url-https-proxy-connect doesn't support multi-stage auth to proxies Date: Wed, 05 Apr 2023 19:34:21 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12352"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62598@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 06 01:35:26 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 1pkCex-0002uO-Ek for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Apr 2023 01:35:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkCee-0006Yq-ER; Wed, 05 Apr 2023 19:35:04 -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 1pkCed-0006Yd-9Z for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 19:35:03 -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 1pkCed-00062Z-0H for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 19:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkCec-0005PA-Cg for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 19:35:02 -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, 05 Apr 2023 23:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62598 X-GNU-PR-Package: emacs Original-Received: via spool by 62598-submit@debbugs.gnu.org id=B62598.168073767620739 (code B ref 62598); Wed, 05 Apr 2023 23:35:02 +0000 Original-Received: (at 62598) by debbugs.gnu.org; 5 Apr 2023 23:34:36 +0000 Original-Received: from localhost ([127.0.0.1]:53020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkCeB-0005OR-RD for submit@debbugs.gnu.org; Wed, 05 Apr 2023 19:34:36 -0400 Original-Received: from mail.fitzsim.org ([69.165.165.189]:44420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkCeA-0005OE-2x for 62598@debbugs.gnu.org; Wed, 05 Apr 2023 19:34:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fitzsim.org ; s=20220430; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gJeeQXvcjJEZ0GfCiGpffsJRymZ7E06k5ajWLjWCheM=; b=EEHEasbFy0Tp6Vq01+8M7ZfDN4 InLGlwOSGUM4M8JeFNnbunSXhAUGBlchSMqnea8MQXiu6N/UAOQRE5Qltl15ixAlVSHSKhQynzrdg uD7SiJovUgnApdAWsM70AJwueHR3KVv9aPDOkN1AaKctXSvZTRaKhjwp9pl17ContPVuDDrfkw+jd Www4wqlPrD2mR8jBkFucHk0v6qtdtjPfucr5ZOCNhXU2JPkzOIyWQLvcKhROxUr72kjNx7MjUA5lU sCh0fxt4z4Vw3CMLPIchNGalmHrqk6sk57/t0t2EJHSHRVaA+Xnx5Hu9Te7sWHHrfWk+aTdDlfgwC SwfOtF4Q==; Original-Received: from [192.168.1.1] (helo=localhost.localdomain) by mail.fitzsim.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pkCe3-000GKg-Nh; Wed, 05 Apr 2023 19:34:27 -0400 In-Reply-To: (Spencer Baugh's message of "Sat, 01 Apr 2023 16:28:39 -0400") 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:259293 Archived-At: Hi Spencer, Spencer Baugh writes: > 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. Why can't that code path call url-http-handle-authentication instead of just failing? What makes HTTPS different from HTTP in this respect? > 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? I'd say try to make both approaches work, and see which one results in the minimum set of changes. Thomas