bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11788: [babc40c4] still fails to implement HTTPS over HTTP proxy pro


From: Ivan Shmakov
Subject: bug#11788: [babc40c4] still fails to implement HTTPS over HTTP proxy properly
Date: Tue, 03 Dec 2013 08:31:14 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

        Example:

(setq url-proxy-services
      '(("https" . "squid.example.net:3128")
        ("http"  . "squid.example.net:3128")))

(url-retrieve "http://example.com/";
              (lambda (&rest args) (message "%S" args)))
; → #<buffer  *http proxy.example.net:3128-668753*>
; the buffer holds the expected HTTP response

(url-retrieve "https://duckduckgo.com/";
              (lambda (&rest args) (message "%S" args)))
; → #<buffer  *http proxy.example.net:3128*-832895>
; the buffer holds an error from the proxy

        A part of the problem is in url-proxy:

    68  (defun url-proxy (url callback &optional cbargs)
    69    ;; Retrieve URL from a proxy.
    70    ;; Expects `url-using-proxy' to be bound to the specific proxy to 
use."
    71    (setq url-using-proxy (url-generic-parse-url url-using-proxy))
    72  
    73    (cond
    74     ((string= (url-type url-using-proxy) "http")
    75      (url-http url callback cbargs))

        Here, neither url-http (which issues the request in plain) nor
        url-https (which tries to establish a TLS connection right away)
        could be appropriate when requesting an HTTPS URI.

        Instead, a plain connection should be established, followed by a
        CONNECT request to the target HOSTNAME:PORT pair, and only
        thereafter TLS is to be started.

    76     (t
    77      (error "Don't know how to use proxy `%s'" url-using-proxy))))

-- 
FSF associate member #7257





reply via email to

[Prev in Thread] Current Thread [Next in Thread]