From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Jerry Asher Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Jan 2012 07:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 10478@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132626585716071 (code B ref -1); Wed, 11 Jan 2012 07:11:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jan 2012 07:10:57 +0000 Received: from localhost ([127.0.0.1]:53150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RksKm-0004B9-GA for submit@debbugs.gnu.org; Wed, 11 Jan 2012 02:10:57 -0500 Received: from eggs.gnu.org ([140.186.70.92]:45651) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RksE7-00041n-R9 for submit@debbugs.gnu.org; Wed, 11 Jan 2012 02:04:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RksDf-0004M3-Dq for submit@debbugs.gnu.org; Wed, 11 Jan 2012 02:03:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:41355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RksDf-0004Lx-CI for submit@debbugs.gnu.org; Wed, 11 Jan 2012 02:03:35 -0500 Received: from eggs.gnu.org ([140.186.70.92]:41141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RksDe-0002ab-0u for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2012 02:03:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RksDc-0004LZ-3h for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2012 02:03:33 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:54604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RksDb-0004LS-Tn for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2012 02:03:32 -0500 Received: by iafj26 with SMTP id j26so778207iaf.0 for ; Tue, 10 Jan 2012 23:03:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=wY8f0sm5glp3HaoRijYG1CoOLsKBSiCn0AfEnXA2G0M=; b=WNkizb8uQ9Jfc1EJbBC4wDktNa0rTDJ3fwfnKvGHZibARUJCt0s7c+VNT7EBPiXrOz 8HNLoan63aa/F6HjH0dwL1pIzDbwVvnDYSbcQXZcJ+CWZul21e88yQRPwxqoGdQnBS7R KYOaNoHgqgBG2EgghfH/4IgsHTImzppBhFB0M= Received: by 10.50.184.166 with SMTP id ev6mr5692467igc.2.1326265409810; Tue, 10 Jan 2012 23:03:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.218.74 with HTTP; Tue, 10 Jan 2012 23:03:06 -0800 (PST) From: Jerry Asher Date: Wed, 11 Jan 2012 00:03:06 -0700 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.4 (---) X-Mailman-Approved-At: Wed, 11 Jan 2012 02:10:54 -0500 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.4 (---) From: Jerry Asher To: bug-gnu-emacs@gnu.org Subject: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Date: Tue, 10 Jan 2012 23:59:59 -0700 Message-ID: <87zkduafm8.fsf@gmail.com> --text follows this line-- I am developing an interface to posterous.com. Posterous has a restful api described at posterous.com/api. They require basic authentication. When making a GET request again their simplest api, users/me that returns information about the logged in user, url-retrieve-synchronously will return the wrong buffer. This seems to be traceable to url-http-parse-headers handling the "401 Basic: Access denied message by" calling url-http-handle-authentication which prompts the user for a name and password and calls url-retrieve-internal to retry the request. This time, url-retrieve-internal will add in the authentication header, and so the request will succeed in a 200. At that point url-retrieve-will return the buffer the response is in, url-http-handle-authentication will return that buffer, but url-http-parse-header will drop that new buffer on the floor, silently. In a similar case, url-http-parse-header will for a 30X redirect uris, set a buffer local variable url-redirect-buffer. It would seem that something similar to this needs to be done for 401 Unauthorized basic authentication. In GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7601) of 2011-09-19 on 3249CTO Windowing system distributor `Microsoft Corp.', version 6.1.7601 configured using `configure --with-gcc (4.5) --no-opt' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: eldoc-mode: t display-time-mode: t desktop-save-mode: t projectile-global-mode: t yas/global-mode: t shell-dirtrack-mode: t recentf-mode: t savehist-mode: t electric-layout-mode: t electric-indent-mode: t global-auto-revert-mode: t delete-selection-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: 1 Recent input: C-s C-s C-s C-l C-a C-n C-n C-n C-n C-n C-n C-f C-a C-s C-a C-s u r l - h t t p - h a n d l e - a u C-s C-s C-r C-r C-r C-a C-a C-s u r l - b a s i c - a C-s C-a C-x 2 C-x o x f i n d - g r e p u r l - b u g - a d C-a C-f C-f C-f C-f C-f C-f C-f - n a m e SPC * " * e l " SPC C-e C-x p C-x p q C-x p C-x 0 C-x o C-a C-s u r l - t r e t r i C-a C-f C-e C-b C-s u r l - h t t p - h a n d l e - a u t h e t n t i c a t i o n C-a C-x o C-x b * U R C-s h a n d l i n e g C-s C-a C-x o C-x 2 C-x o x C-e C-b C-b C-b C-b C-b C-b h t t p - h a n d l e < C-s h r l - u r l - h a n d l t t p - h a n d l e - a C-s C-s C-r C-r C-a C-l C-x 1 C-e C-b C-x 3 x r p o e p o r t - b u g b e m a c s - Recent messages: Mark saved where search started Mark set Mark saved where search started Mark set Mark saved where search started [3 times] Grep finished (matches found) Mark saved where search started [3 times] Grep finished (matches found) Mark set Mark saved where search started Load-path shadows: c:/users/jerry/d/Dropbox/emacs/site/site-start hides c:/Program Files (x86)/emacs/emacs-24.0.50/../site-lisp/site-start c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/ezimage hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/ezimage c:/users/jerry/d/Dropbox/emacs-prelude/personal/custom hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/custom c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/pulse hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/pulse c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/mode-local hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/mode-local c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/inversion hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/inversion c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/data-debug hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/data-debug c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/cedet hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/cedet c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/cedet-idutils hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/cedet-idutils c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/cedet-global hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/cedet-global c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/cedet-files hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/cedet-files c:/users/jerry/d/Dropbox/emacs/site/cedet-1.0/common/cedet-cscope hides c:/Program Files (x86)/emacs/emacs-24.0.50/lisp/cedet/cedet-cscope Features: (shadow mail-extr message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader emacsbug grep dired-aux url-cache apropos cus-edit cus-start cus-load mail-utils network-stream starttls debug posterous url-http tls url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse url-vars mailcap paredit find-func multi-isearch mule-util help-mode view time-stamp vc-git eldoc dired time desktop prelude-xml prelude-scheme prelude-ruby feature-mode cucumber-mode scss-mode flymake compile derived haml-mode js json newcomment cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs markdown-mode noutline outline css-mode ruby-end ruby-block easy-mmode ruby-mode yari ansi-color prelude-markdown prelude-emacs-lisp prelude-common-lisp prelude-lisp prelude-c prelude-global-keybindings prelude-editor projectile yasnippet edmacro kmacro tramp tramp-compat auth-source eieio assoc gnus-util mm-util mail-prsvr password-cache shell pcomplete format-spec tramp-loaddefs windmove recentf tree-widget wid-edit savehist saveplace uniquify electric autorevert delsel prelude-core byte-opt warnings bytecomp byte-compile cconv macroexp imenu thingatpt prelude-packages anything-autoloads auctex-autoloads tex-site info easymenu clojure-mode-autoloads coffee-mode-autoloads deft-autoloads gist-autoloads haskell-mode-autoloads icomplete+-autoloads lacarte-autoloads magit-autoloads markdown-mode-autoloads paredit-autoloads projectile-autoloads sass-mode-autoloads haml-mode-autoloads scss-mode-autoloads slime-autoloads synonyms-autoloads wgrep-autoloads yaml-mode-autoloads yari-autoloads yasnippet-autoloads package tabulated-list prelude-ui url-coding paren sort cygwin-mount ange-ftp comint regexp-opt ring executable cl server advice help-fns advice-preload time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process multi-tty emacs) From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: Possible fix?? References: In-Reply-To: Resent-From: Jerry Asher Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Jan 2012 07:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.132626850919955 (code B ref 10478); Wed, 11 Jan 2012 07:56:02 +0000 Received: (at 10478) by debbugs.gnu.org; 11 Jan 2012 07:55:09 +0000 Received: from localhost ([127.0.0.1]:53170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rkt1V-0005Bj-Ef for submit@debbugs.gnu.org; Wed, 11 Jan 2012 02:55:09 -0500 Received: from mail-iy0-f172.google.com ([209.85.210.172]:56121) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rkt1R-0005BI-AF for 10478@debbugs.gnu.org; Wed, 11 Jan 2012 02:55:04 -0500 Received: by iaae16 with SMTP id e16so314149iaa.3 for <10478@debbugs.gnu.org>; Tue, 10 Jan 2012 23:54:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=5hSJDT1pCtn7zDdpnCpJH5XZf3lODL0G9ZXI65aScAU=; b=u1YYRPA3PSB6RiW0VMSLPH27uawZHWO5h65GHaLiOXZ5gyLeSXuBpsUobHOR6Bf7I9 f+JBAyXNGh/UDWykuI1wpoXpXZ5TxLTE1XS4cR5CzewfNKaaOpAVdwLF68EtHlstofIU JS2xjrYL2/XG7o3yjRBlMsCQVPaFCg8gJarAI= Received: by 10.50.45.195 with SMTP id p3mr5459567igm.2.1326268476507; Tue, 10 Jan 2012 23:54:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.218.74 with HTTP; Tue, 10 Jan 2012 23:54:15 -0800 (PST) From: Jerry Asher Date: Wed, 11 Jan 2012 00:54:15 -0700 Message-ID: Content-Type: multipart/alternative; boundary=14dae934061b6b464204b63bf1f8 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 --14dae934061b6b464204b63bf1f8 Content-Type: text/plain; charset=ISO-8859-1 The following, ugly, changes in url-http.el seem to work, based on very very very limited testing.... Basically, I changed url-http-handle-authentication so that if a change of buffer was made, it would return the new buffer, otherwise it would return nil. Then in url-http-parse-headers, I cut and pasted code for the 3XX redirect case that sets a flag for url-retrieve-synchronously to do the same thing for the 401 and 407 cases. I apologize, instead of sending patches, I am just going to attach the two new functions. (defun url-http-handle-authentication (proxy) (declare (special status success url-http-method url-http-data url-callback-function url-callback-arguments)) (url-http-debug "Handling %s authentication" (if proxy "proxy" "normal")) (let ((auths (or (nreverse (mail-fetch-field (if proxy "proxy-authenticate" "www-authenticate") nil nil t)) '("basic"))) (type nil) (url (url-recreate-url url-current-object)) (auth-url (url-recreate-url (if (and proxy (boundp 'url-http-proxy)) url-http-proxy url-current-object))) (url-basic-auth-storage (if proxy ;; Cheating, but who cares? :) 'url-http-proxy-basic-auth-storage 'url-http-real-basic-auth-storage)) auth (strength 0) (retval nil)) ;; find strongest supported auth (dolist (this-auth auths) (setq this-auth (url-eat-trailing-space (url-strip-leading-spaces this-auth))) (let* ((this-type (if (string-match "[ \t]" this-auth) (downcase (substring this-auth 0 (match-beginning 0))) (downcase this-auth))) (registered (url-auth-registered this-type)) (this-strength (cddr registered))) (when (and registered (> this-strength strength)) (setq auth this-auth type this-type strength this-strength)))) (if (not (url-auth-registered type)) (progn (widen) (goto-char (point-max)) (insert "
Sorry, but I do not know how to handle " type " authentication. If you'd like to write it," " send it to " url-bug-address ".
") (setq status t) (setq retval nil)) (let* ((args (url-parse-args (subst-char-in-string ?, ?\; auth))) (auth (url-get-authentication auth-url (cdr-safe (assoc "realm" args)) type t args))) (if (not auth) (progn (setq success t) (set retval nil)) (push (cons (if proxy "Proxy-Authorization" "Authorization") auth) url-http-extra-headers) (let ((url-request-method url-http-method) (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers) (response-buffer nil)) (setq response-buffer (url-retrieve-internal url url-callback-function url-callback-arguments)) (url-http-debug "Handling authentication return buffer is %s" response-buffer) (setq retval response-buffer))))) (url-http-debug "Handling authentication retval is %s 2:" retval) retval)) and ;; GET HERE (defun url-http-parse-headers () "Parse and handle HTTP specific headers. Return t if and only if the current buffer is still active and should be shown to the user." ;; The comments after each status code handled are taken from RFC ;; 2616 (HTTP/1.1) (declare (special url-http-end-of-headers url-http-response-status url-http-response-version url-http-method url-http-data url-http-process url-callback-function url-callback-arguments)) (url-http-mark-connection-as-free (url-host url-current-object) (url-port url-current-object) url-http-process) (if (or (not (boundp 'url-http-end-of-headers)) (not url-http-end-of-headers)) (error "Trying to parse headers in odd buffer: %s" (buffer-name))) (goto-char (point-min)) (url-http-debug "url-http-parse-headers called in (%s)" (buffer-name)) (url-http-parse-response) (mail-narrow-to-head) ;;(narrow-to-region (point-min) url-http-end-of-headers) (let ((connection (mail-fetch-field "Connection"))) ;; In HTTP 1.0, keep the connection only if there is a ;; "Connection: keep-alive" header. ;; In HTTP 1.1 (and greater), keep the connection unless there is a ;; "Connection: close" header (cond ((string= url-http-response-version "1.0") (unless (and connection (string= (downcase connection) "keep-alive")) (delete-process url-http-process))) (t (when (and connection (string= (downcase connection) "close")) (delete-process url-http-process))))) (let ((buffer (current-buffer)) (class nil) (success nil) ;; 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) (url-http-handle-cookies) (case class ;; Classes of response codes ;; ;; 5xx = Server Error ;; 4xx = Client Error ;; 3xx = Redirection ;; 2xx = Successful ;; 1xx = Informational (1 ; Information messages ;; 100 = Continue with request ;; 101 = Switching protocols ;; 102 = Processing (Added by DAV) (url-mark-buffer-as-dead buffer) (error "HTTP responses in class 1xx not supported (%d)" url-http-response-status)) (2 ; Success ;; 200 Ok ;; 201 Created ;; 202 Accepted ;; 203 Non-authoritative information ;; 204 No content ;; 205 Reset content ;; 206 Partial content ;; 207 Multi-status (Added by DAV) (case status-symbol ((no-content reset-content) ;; No new data, just stay at the same document (url-mark-buffer-as-dead buffer) (setq success t)) (otherwise ;; Generic success for all others. Store in the cache, and ;; mark it as successful. (widen) (if (and url-automatic-caching (equal url-http-method "GET")) (url-store-in-cache buffer)) (setq success t)))) (3 ; Redirection ;; 300 Multiple choices ;; 301 Moved permanently ;; 302 Found ;; 303 See other ;; 304 Not modified ;; 305 Use proxy ;; 307 Temporary redirect (let ((redirect-uri (or (mail-fetch-field "Location") (mail-fetch-field "URI")))) (case status-symbol (multiple-choices ; 300 ;; Quoth the spec (section 10.3.1) ;; ------------------------------- ;; The requested resource corresponds to any one of a set of ;; representations, each with its own specific location and ;; agent-driven negotiation information is being provided so ;; that the user can select a preferred representation and ;; redirect its request to that location. ;; [...] ;; If the server has a preferred choice of representation, it ;; SHOULD include the specific URI for that representation in ;; the Location field; user agents MAY use the Location field ;; value for automatic redirection. ;; ------------------------------- ;; We do not support agent-driven negotiation, so we just ;; redirect to the preferred URI if one is provided. nil) ((moved-permanently found temporary-redirect) ; 301 302 307 ;; If the 301|302 status code is received in response to a ;; request other than GET or HEAD, the user agent MUST NOT ;; automatically redirect the request unless it can be ;; confirmed by the user, since this might change the ;; conditions under which the request was issued. (unless (member url-http-method '("HEAD" "GET")) (setq redirect-uri nil))) (see-other ; 303 ;; The response to the request can be found under a different ;; URI and SHOULD be retrieved using a GET method on that ;; resource. (setq url-http-method "GET" url-http-data nil)) (not-modified ; 304 ;; The 304 response MUST NOT contain a message-body. (url-http-debug "Extracting document from cache... (%s)" (url-cache-create-filename (url-view-url t))) (url-cache-extract (url-cache-create-filename (url-view-url t))) (setq redirect-uri nil success t)) (use-proxy ; 305 ;; The requested resource MUST be accessed through the ;; proxy given by the Location field. The Location field ;; gives the URI of the proxy. The recipient is expected ;; to repeat this single request via the proxy. 305 ;; responses MUST only be generated by origin servers. (error "Redirection thru a proxy server not supported: %s" redirect-uri)) (otherwise ;; Treat everything like '300' nil)) (when redirect-uri ;; Clean off any whitespace and/or <...> cruft. (if (string-match "\\([^ \t]+\\)[ \t]" redirect-uri) (setq redirect-uri (match-string 1 redirect-uri))) (if (string-match "^<\\(.*\\)>$" redirect-uri) (setq redirect-uri (match-string 1 redirect-uri))) ;; Some stupid sites (like sourceforge) send a ;; non-fully-qualified URL (ie: /), which royally confuses ;; the URL library. (if (not (string-match url-nonrelative-link redirect-uri)) ;; Be careful to use the real target URL, otherwise we may ;; compute the redirection relative to the URL of the proxy. (setq redirect-uri (url-expand-file-name redirect-uri url-http-target-url))) (let ((url-request-method url-http-method) (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers)) ;; Check existing number of redirects (if (or (< url-max-redirections 0) (and (> url-max-redirections 0) (let ((events (car url-callback-arguments)) (old-redirects 0)) (while events (if (eq (car events) :redirect) (setq old-redirects (1+ old-redirects))) (and (setq events (cdr events)) (setq events (cdr events)))) (< old-redirects url-max-redirections)))) ;; url-max-redirections hasn't been reached, so go ;; ahead and redirect. (progn ;; Remember that the request was redirected. (setf (car url-callback-arguments) (nconc (list :redirect redirect-uri) (car url-callback-arguments))) ;; Put in the current buffer a forwarding pointer to the new ;; destination buffer. ;; FIXME: This is a hack to fix url-retrieve-synchronously ;; without changing the API. Instead url-retrieve should ;; either simply not return the "destination" buffer, or it ;; should take an optional `dest-buf' argument. (set (make-local-variable 'url-redirect-buffer) (url-retrieve-internal redirect-uri url-callback-function url-callback-arguments (url-silent url-current-object))) (url-mark-buffer-as-dead buffer)) ;; We hit url-max-redirections, so issue an error and ;; stop redirecting. (url-http-debug "Maximum redirections reached") (setf (car url-callback-arguments) (nconc (list :error (list 'error 'http-redirect-limit redirect-uri)) (car url-callback-arguments))) (setq success t)))))) (4 ; Client error ;; 400 Bad Request ;; 401 Unauthorized ;; 402 Payment required ;; 403 Forbidden ;; 404 Not found ;; 405 Method not allowed ;; 406 Not acceptable ;; 407 Proxy authentication required ;; 408 Request time-out ;; 409 Conflict ;; 410 Gone ;; 411 Length required ;; 412 Precondition failed ;; 413 Request entity too large ;; 414 Request-URI too large ;; 415 Unsupported media type ;; 416 Requested range not satisfiable ;; 417 Expectation failed ;; 422 Unprocessable Entity (Added by DAV) ;; 423 Locked ;; 424 Failed Dependency (case status-symbol (unauthorized ; 401 ;; The request requires user authentication. The response ;; MUST include a WWW-Authenticate header field containing a ;; challenge applicable to the requested resource. The ;; client MAY repeat the request with a suitable ;; Authorization header field. ;; bug patch because url-http-handle-authentication ;; might return a new buffer (let ((retval (url-http-handle-authentication nil))) (url-http-debug "Url Http Parse Headers: handling authentication return buffer TO %s" retval) (when retval ;; Put in the current buffer a forwarding pointer to the new ;; destination buffer. ;; FIXME: This is a hack to fix url-retrieve-synchronously ;; without changing the API. Instead url-retrieve should ;; either simply not return the "destination" buffer, or it ;; should take an optional `dest-buf' argument. (set (make-local-variable 'url-redirect-buffer) retval) (url-http-debug "Url Http Parse Headers: handling authentication return buffer TO %s -> %s 2:" retval url-redirect-buffer) (url-mark-buffer-as-dead buffer)))) (payment-required ; 402 ;; This code is reserved for future use (url-mark-buffer-as-dead buffer) (error "Somebody wants you to give them money")) (forbidden ; 403 ;; The server understood the request, but is refusing to ;; fulfill it. Authorization will not help and the request ;; SHOULD NOT be repeated. (setq success t)) (not-found ; 404 ;; Not found (setq success t)) (method-not-allowed ; 405 ;; The method specified in the Request-Line is not allowed ;; for the resource identified by the Request-URI. The ;; response MUST include an Allow header containing a list of ;; valid methods for the requested resource. (setq success t)) (not-acceptable ; 406 ;; The resource identified by the request is only capable of ;; generating response entities which have content ;; characteristics nota cceptable according to the accept ;; headers sent in the request. (setq success t)) (proxy-authentication-required ; 407 ;; This code is similar to 401 (Unauthorized), but indicates ;; that the client must first authenticate itself with the ;; proxy. The proxy MUST return a Proxy-Authenticate header ;; field containing a challenge applicable to the proxy for ;; the requested resource. ;; bug patch because url-http-handle-authentication ;; might return a new buffer (let ((retval (url-http-handle-authentication t))) (when retval ;; Put in the current buffer a forwarding pointer to the new ;; destination buffer. ;; FIXME: This is a hack to fix url-retrieve-synchronously ;; without changing the API. Instead url-retrieve should ;; either simply not return the "destination" buffer, or it ;; should take an optional `dest-buf' argument. (set (make-local-variable 'url-redirect-buffer) retval) (url-mark-buffer-as-dead buffer)))) (request-timeout ; 408 ;; The client did not produce a request within the time that ;; the server was prepared to wait. The client MAY repeat ;; the request without modifications at any later time. (setq success t)) (conflict ; 409 ;; The request could not be completed due to a conflict with ;; the current state of the resource. This code is only ;; allowed in situations where it is expected that the user ;; mioght be able to resolve the conflict and resubmit the ;; request. The response body SHOULD include enough ;; information for the user to recognize the source of the ;; conflict. (setq success t)) (gone ; 410 ;; The requested resource is no longer available at the ;; server and no forwarding address is known. (setq success t)) (length-required ; 411 ;; The server refuses to accept the request without a defined ;; Content-Length. The client MAY repeat the request if it ;; adds a valid Content-Length header field containing the ;; length of the message-body in the request message. ;; ;; NOTE - this will never happen because ;; `url-http-create-request' automatically calculates the ;; content-length. (setq success t)) (precondition-failed ; 412 ;; The precondition given in one or more of the ;; request-header fields evaluated to false when it was ;; tested on the server. (setq success t)) ((request-entity-too-large request-uri-too-large) ; 413 414 ;; The server is refusing to process a request because the ;; request entity|URI is larger than the server is willing or ;; able to process. (setq success t)) (unsupported-media-type ; 415 ;; The server is refusing to service the request because the ;; entity of the request is in a format not supported by the ;; requested resource for the requested method. (setq success t)) (requested-range-not-satisfiable ; 416 ;; A server SHOULD return a response with this status code if ;; a request included a Range request-header field, and none ;; of the range-specifier values in this field overlap the ;; current extent of the selected resource, and the request ;; did not include an If-Range request-header field. (setq success t)) (expectation-failed ; 417 ;; The expectation given in an Expect request-header field ;; could not be met by this server, or, if the server is a ;; proxy, the server has unambiguous evidence that the ;; request could not be met by the next-hop server. (setq success t)) (otherwise ;; The request could not be understood by the server due to ;; malformed syntax. The client SHOULD NOT repeat the ;; request without modifications. (setq success t))) ;; Tell the callback that an error occurred, and what the ;; status code was. (when success (setf (car url-callback-arguments) (nconc (list :error (list 'error 'http url-http-response-status)) (car url-callback-arguments))))) (5 ;; 500 Internal server error ;; 501 Not implemented ;; 502 Bad gateway ;; 503 Service unavailable ;; 504 Gateway time-out ;; 505 HTTP version not supported ;; 507 Insufficient storage (setq success t) (case url-http-response-status (not-implemented ; 501 ;; The server does not support the functionality required to ;; fulfill the request. nil) (bad-gateway ; 502 ;; The server, while acting as a gateway or proxy, received ;; an invalid response from the upstream server it accessed ;; in attempting to fulfill the request. nil) (service-unavailable ; 503 ;; The server is currently unable to handle the request due ;; to a temporary overloading or maintenance of the server. ;; The implication is that this is a temporary condition ;; which will be alleviated after some delay. If known, the ;; length of the delay MAY be indicated in a Retry-After ;; header. If no Retry-After is given, the client SHOULD ;; handle the response as it would for a 500 response. nil) (gateway-timeout ; 504 ;; The server, while acting as a gateway or proxy, did not ;; receive a timely response from the upstream server ;; specified by the URI (e.g. HTTP, FTP, LDAP) or some other ;; auxiliary server (e.g. DNS) it needed to access in ;; attempting to complete the request. nil) (http-version-not-supported ; 505 ;; The server does not support, or refuses to support, the ;; HTTP protocol version that was used in the request ;; message. nil) (insufficient-storage ; 507 (DAV) ;; The method could not be performed on the resource ;; because the server is unable to store the representation ;; needed to successfully complete the request. This ;; condition is considered to be temporary. If the request ;; which received this status code was the result of a user ;; action, the request MUST NOT be repeated until it is ;; requested by a separate user action. nil)) ;; Tell the callback that an error occurred, and what the ;; status code was. (when success (setf (car url-callback-arguments) (nconc (list :error (list 'error 'http url-http-response-status)) (car url-callback-arguments))))) (otherwise (error "Unknown class of HTTP response code: %d (%d)" class url-http-response-status))) (if (not success) (url-mark-buffer-as-dead buffer)) (url-http-debug "Finished parsing HTTP headers: %S" success) (widen) success)) --14dae934061b6b464204b63bf1f8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The following, ugly, changes in url-http.el seem to work, based on very very very limited testi= ng....

Basically,

I changed url-http-handle-authentication so that if a change of= buffer was made, it would return the new buffer, otherwise it would return= nil.

Then in=A0 url-http-parse-= headers,=A0I=A0cut and pasted code for the 3XX redirect case that se= ts a flag for url-retrieve-synchronously to do the same thing for the =A040= 1 and 407 cases.

I apologize, instead of sending patches, I am just going to = attach the two new functions.

(defun url-http-handle-authentication (pro= xy)
=A0 (declare (special = status success url-http-method url-http-data
=A0 =A0url-callback-function url-callback-argume= nts))
=A0 (url-http-debug &q= uot;Handling %s authentication" (if proxy "proxy" "norm= al"))
=A0 (let ((auths (or (nreverse
=A0 =A0(mail-fetch-field
=A0 =A0 (if proxy "= ;proxy-authenticate" "www-authenticate")
=A0 =A0 nil nil t))
=A0'("basic"))= )
(type nil)
(url (url-recreate-url url-current-object= ))
(auth-url (url-recreate-url
=A0 (if (and proxy (bo= undp 'url-http-proxy))
=A0 =A0 =A0 url-http-proxy
=A0 =A0 url-current= -object)))
(url-basic-auth-storage (if prox= y
=A0 =A0;; Chea= ting, but who cares? :)
=A0 =A0'url-http-proxy-b= asic-auth-storage
=A0'url-http-real-basic-auth-storage))
auth
(strength 0)
=A0 =A0 =A0 =A0 (retva= l nil))
=A0 =A0= ;; find strongest supported auth
=A0 =A0 (dolist (this-= auth auths)
=A0 =A0 =A0 (url-strip-leading-spaces
this-auth)))
= =A0 =A0 =A0 (let* ((this-ty= pe
=A0 =A0 =A0(if (string-match &q= uot;[ \t]" this-auth)
= =A0(downcase (substring this-auth 0 (match-beginning 0)))
(downcase this-auth)))
=A0 =A0 (registered (url-au= th-registered this-type))
=A0 =A0 (this-strength (cddr re= gistered)))
(when (a= nd registered (> this-strength strength))
=A0(setq auth this-auth<= /div>
type this-type
strength this-strength))))

=A0 =A0 (if (not (url-auth-= registered type))
(p= rogn
=A0(widen)
=A0(goto-char (point-max))
=A0(insert "<hr>Sorr= y, but I do not know how to handle " type
=A0" authentication. =A0If you'd li= ke to write it,"
=A0" send it to " ur= l-bug-address ".<hr>")
=A0(setq status t)
=A0 =A0 =A0 =A0 =A0 (s= etq retval nil))
=A0 =A0 =A0 (let* ((args (url-parse-args (subst-char-in-string ?, ?\= ; auth)))
=A0 =A0 (auth (url-get-authenti= cation auth-url
= =A0 (cdr-safe (assoc "realm" args))
=A0 type t args)))
(if (not auth)
=A0 =A0 =A0 =A0 =A0 = =A0 (progn
=A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq success t)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 (set retv= al nil))
=A0(push (cons (if proxy "= Proxy-Authorization" "Authorization") auth)
url-http-extra-headers)
=A0(let ((url-request-method ur= l-http-method)
(url= -request-data url-http-data)
(url-request-extra-headers url-= http-extra-headers)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (response-buffer nil))
=A0 =A0(setq response-buffer
=A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 (url-retrieve-internal url url-callback-function
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0url-callback= -arguments))
=A0 =A0 =A0 =A0 =A0 =A0 (url-http-debug "Handling authentication re= turn buffer is %s" response-buffer)
=A0 =A0 =A0 =A0 =A0 = =A0 (setq retval response-buffer)))))
=A0 =A0 (url-http-debug "Handling authenti= cation retval is %s 2:" retval)
=A0 =A0 retval))


and

;; GET HERE
(defun url-http-parse-= headers ()
=A0"Parse and handle HTTP specific headers.
Return t if and only if the current= buffer is still active and
should be shown to the= user."
=A0 ;; The comments after each status code handled are taken from RFC
=A0 ;; 2616 (HTTP/1.1)=
=A0 (decl= are (special url-http-end-of-headers url-http-response-status
<= div> =A0 =A0url-http-response-version
=A0 =A0url-http-met= hod url-http-data url-http-process
=A0 =A0url-callback-function u= rl-callback-arguments))

=A0 (url-= http-mark-connection-as-free (url-host url-current-object)
=A0 =A0(url-port url-current-obj= ect)
=A0 =A0url-http-process)

=A0 (if (or (not (boundp &#= 39;url-http-end-of-headers))
=A0(not url-http-end-of-headers))
=A0 =A0 =A0 (error &qu= ot;Trying to parse headers in odd buffer: %s" (buffer-name)))
=A0 (goto-char (po= int-min))
=A0 (url-http-debug &q= uot;url-http-parse-headers called in (%s)" (buffer-name))
=
=A0 (url-http-parse-re= sponse)
=A0 (mail-narrow-to-he= ad)
=A0 ;;= (narrow-to-region (point-min) url-http-end-of-headers)
=A0 (let ((connection (mail-fe= tch-field "Connection")))
=A0 =A0 ;; In HTTP 1.0= , keep the connection only if there is a
=A0 =A0 ;; "Connection: keep-alive"= ; header.
=A0 =A0 ;; In HTTP 1.1= (and greater), keep the connection unless there is a
=A0 =A0 ;; "Connection: cl= ose" header
=A0 =A0 (cond
=A0 =A0 =A0((strin= g=3D url-http-response-version "1.0")
=A0 =A0 =A0 (unless (and connection
=A0 (string=3D (downcase conne= ction) "keep-alive"))
(delete-process url-http-process)))
=A0 =A0 =A0(t
=A0 =A0 =A0 (when = (and connection
(s= tring=3D (downcase connection) "close"))
(delete-process url-http-process= )))))
=A0 = (let ((buffer (current-buffer))
(class nil)
(success nil)
;; other status symbols: jewelry= and luxury cars
(st= atus-symbol (cadr (assq url-http-response-status url-http-codes)))
;; The filename part of a URL co= uld be in remote file syntax,
;; see Bug#6717 for an example. =A0We disable file name
;; handlers, therefore.
(file-name-handler-alist nil= ))
=A0 =A0 (setq class (/= url-http-response-status 100))
=A0 =A0 (url-http-debug "Parsed HTTP headers: cl= ass=3D%d status=3D%d" class url-http-response-status)
=A0 =A0 (url-http-hand= le-cookies)
=A0= =A0 (case class
=A0 =A0 =A0 ;; Classes= of response codes
=A0 =A0 =A0 ;;
=A0 =A0 =A0 ;; 5xx =3D Server Error
=A0 =A0 =A0 ;; 4xx =3D= Client Error
=A0 =A0 =A0 ;; 3xx =3D Redirection
=A0 =A0 =A0 ;; 2xx =3D Successful
=A0 =A0 =A0 ;; 1xx =3D= Informational
=A0 =A0 =A0 (1 ; Information messages
=A0 =A0 =A0 =A0;; 100 = =3D Continue with request
=A0 =A0 =A0 =A0;; 101 =3D Switching protocols
<= div>=A0 =A0 =A0 =A0;; 102 = =3D Processing (Added by DAV)
=A0 =A0 =A0 =A0(url-ma= rk-buffer-as-dead buffer)
=A0 =A0 =A0 =A0(error "HTTP responses in class 1xx not= supported (%d)" url-http-response-status))
=A0 =A0 =A0 (2 ; Success
=A0 =A0 =A0 =A0= ;; 200 Ok
=A0 =A0 =A0 =A0;; 201 = Created
= =A0 =A0 =A0 =A0;; 202 Accepted
=A0 =A0 =A0 =A0;; 203 Non-authoritative information
=A0 =A0 =A0 =A0;; 204 = No content
=A0 =A0 =A0 =A0;; 205 Reset content
=A0 =A0 =A0 =A0;; 206 Partial content
=A0 =A0 =A0 =A0;; 207 = Multi-status (Added by DAV)
=A0 =A0 =A0 =A0(case status-symbol
((no-content reset-content)
=A0;; No new data, just stay at= the same document
= =A0(url-mark-buffer-as-dead buffer)
=A0(setq success t))
(otherwise
=A0;; Generic success for all o= thers. =A0Store in the cache, and
=A0;; mark it as successful.
=A0(widen)
=A0(if (and url-automatic-caching (equa= l url-http-method "GET"))
=A0 =A0 =A0(url-store-in-cache = buffer))
<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> =A0(setq s= uccess t))))
=A0 =A0 =A0 (3 ; Redirection
=A0 =A0 =A0= =A0;; 300 Multiple choices
=A0 =A0 =A0 =A0;; 301 = Moved permanently
=A0 =A0 =A0 =A0;; 302 Found
=A0 =A0 =A0 =A0;; 303 See other
=A0 =A0 =A0 =A0;; 304 = Not modified
=A0 =A0 =A0 =A0;; 305 Use proxy
=A0 =A0 =A0 =A0;; 307 Temporary redirect
=A0 =A0 =A0 =A0(let ((= redirect-uri (or (mail-fetch-field "Location")
<= font face=3D"'courier new', monospace"> =A0 =A0 =A0 (mail-fetch-field "= ;URI"))))
(case status-symbol
=A0 (multiple-choices =A0 =A0; 300
=A0 =A0;; Quoth the spec (secti= on 10.3.1)
=A0 =A0;= ; -------------------------------
=A0 =A0;; The requested resourc= e corresponds to any one of a set of
=A0 =A0;; representations, each with its own specific loc= ation and
=A0 =A0;; agent-driven negotiat= ion information is being provided so
=A0 =A0;; that the user can select a preferred representa= tion and
=A0 =A0;; redirect its request = to that location.
= =A0 =A0;; [...]
=A0 =A0;; If the server has a p= referred choice of representation, it
=A0 =A0;; SHOULD include the specific URI for that repre= sentation in
=A0 =A0;; the Location field; u= ser agents MAY use the Location field
=A0 =A0;; value for automatic redirection.
=A0 =A0;; ---------------------= ----------
=A0 =A0;= ; We do not support agent-driven negotiation, so we just
=A0 =A0;; redirect to the prefe= rred URI if one is provided.
=A0 =A0nil)
=A0 ((moved-permanently found t= emporary-redirect) ; 301 302 307
=A0 =A0;; If the 301|302 status code is received in response = to a
=A0 =A0;; request other than GE= T or HEAD, the user agent MUST NOT
=A0 =A0;; automatically redirect the request unless it can = be
=A0 =A0;; confirmed by the user= , since this might change the
=A0 =A0;; conditions under which the request was issued.<= /div>
=A0 =A0(unless (member url-http= -method '("HEAD" "GET"))
=A0 =A0 =A0(setq redirect-uri nil)))
=A0 (see-other ; 303
=A0 =A0;; The response to the request = can be found under a different
=A0 =A0;; URI and SHOULD be ret= rieved using a GET method on that
=A0 =A0;; resource.
=A0 =A0(setq url-http-method &q= uot;GET"
=A0u= rl-http-data nil))
=A0 (not-modified ; 304
= =A0 =A0;; The 304 response MUST NOT = contain a message-body.
=A0 =A0(url-http-debug "Ex= tracting document from cache... (%s)"
=A0 =A0(url-cache-create-filename (url-view-url t= )))
=A0 =A0(url-cache-extract (url-= cache-create-filename (url-view-url t)))
=A0 =A0(setq redirect-uri nil
=A0success t))
=A0 (use-proxy ; 305
=A0 =A0;; The requested resourc= e MUST be accessed through the
=A0 =A0;; proxy given by the Location field. =A0The Location fi= eld
=A0 =A0;; gives the URI of the = proxy. =A0The recipient is expected
=A0 =A0;; to repeat this single request via the proxy. =A0= 305
=A0 =A0;; responses MUST only b= e generated by origin servers.
=A0 =A0(error "Redirection thru a proxy server not support= ed: %s"
=A0 redirect-uri))
=A0 (otherwise
=A0 =A0;; Treat everything like= '300'
=A0 = =A0nil))
(when redirect-uri
=
=A0 ;; Clean off any whitespace= and/or <...> cruft.
=A0 (if (string-match "\\(= [^ \t]+\\)[ \t]" redirect-uri)
=A0 =A0 =A0 (setq redirect-uri (match-string 1 redirect-ur= i)))
=A0 (if (string-match "^&l= t;\\(.*\\)>$" redirect-uri)
=A0 =A0 =A0 (setq redirect-uri (match-string 1 redirect-ur= i)))

= =A0 ;; Some stupid sites (like sourc= eforge) send a
=A0 ;; non-fully-qualified URL = (ie: /), which royally confuses
=A0 ;; the URL library.
=A0 (if (not (string-match url-= nonrelative-link redirect-uri))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; Be careful to use t= he real target URL, otherwise we may
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0;; compute the redirection relative to the URL of the proxy.
=A0 =A0 =A0 (setq re= direct-uri
=A0 =A0 (url-expand-file-name = redirect-uri url-http-target-url)))
=A0 =A0 =A0 =A0 =A0 =A0(let ((url-request-method = url-http-method)
(url-request-data url-http-dat= a)
(url-request-ex= tra-headers url-http-extra-headers))
=A0 =A0 ;; Check existing numbe= r of redirects
=A0 = =A0 (if (or (< url-max-redirections 0)
=A0 =A0 (and (> url-max-red= irections 0)
=A0(= let ((events (car url-callback-arguments))
(old-redirects 0))
=A0 =A0(while events=
=A0 =A0 =A0(if (eq (car event= s) :redirect)
= =A0(setq old-redirects (1+ old-redirects)))
=A0 =A0 =A0(and (setq events = (cdr events))
= =A0 (setq events (cdr events))))
=A0 =A0(< old-redirects ur= l-max-redirections))))
;; url-max-redirections hasn't been reached, so go
;; ahead and redirect.<= /div>
(progn
=A0 ;; Remember that the reque= st was redirected.
= =A0 (setf (car url-callback-arguments)
(nconc (list :redirect redire= ct-uri)
(car url-= callback-arguments)))
=A0 ;; Put in the current buff= er a forwarding pointer to the new
=A0 ;; destination buffer.
=A0 ;; FIXME: This is a hack t= o fix url-retrieve-synchronously
=A0 ;; without changing the API. =A0Instead url-retrieve sho= uld
=A0 ;; either simply not retur= n the "destination" buffer, or it
=A0 ;; should take an optional `dest-buf' arg= ument.
=A0 (set (make-local-variable = 'url-redirect-buffer)
= (url-retrieve-internal
redirect-uri url-callback-fun= ction
url-callbac= k-arguments
(url-silent url-current-objec= t)))
=A0 (url-mark= -buffer-as-dead buffer))
=A0 =A0 =A0 ;; We hit url-max-r= edirections, so issue an error and
=A0 =A0 =A0 ;; stop redirecting.
=A0 =A0 =A0 (url-http-debug &qu= ot;Maximum redirections reached")
=A0 =A0 =A0 (setf (car url-callback-arguments)
=A0 =A0 (nconc (list :error (l= ist 'error 'http-redirect-limit
=A0 =A0 =A0 redirect-uri))
=A0 =A0(car url-callback-argu= ments)))
<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> =A0 =A0 = =A0 (setq success t))))))
=A0 =A0 =A0 (4 ; Client error<= /font>
=A0 =A0 = =A0 =A0;; 400 Bad Request
=A0 =A0 =A0 =A0;; 401 = Unauthorized
=A0 =A0 =A0 =A0;; 402 Payment required
=A0 =A0 =A0 =A0;; 403 Forbidden
=A0 =A0 =A0 =A0;; 404 = Not found
= =A0 =A0 =A0 =A0;; 405 Method not allowed
=A0 =A0 =A0 =A0;; 406 Not acceptable<= /div>
=A0 =A0 =A0 =A0;; 407 = Proxy authentication required
=A0 =A0 =A0 =A0;; 408 Request time-out
=A0 =A0 =A0 =A0;; 409 Conf= lict
=A0 =A0 =A0 =A0;; 410 = Gone
=A0 = =A0 =A0 =A0;; 411 Length required
=A0 =A0 =A0 =A0;; 412 Precondition failed
=A0 =A0 =A0 =A0;; 413 = Request entity too large
=A0 =A0 =A0 =A0;; 414 Request-URI too large
=A0 =A0 =A0 =A0;; 415 Unsu= pported media type
=A0 =A0 =A0 =A0;; 416 = Requested range not satisfiable
=A0 =A0 =A0 =A0;; 417 Expectation failed
=
=A0 =A0 =A0 =A0;; 422 = Unprocessable Entity (Added by DAV)
=A0 =A0 =A0 =A0;; 423 = Locked
=A0= =A0 =A0 =A0;; 424 Failed Dependency
=A0 =A0 =A0 =A0(case status-symbol
(unauthorized ; 401
=A0;; The request requires user authent= ication. =A0The response
=A0;; MUST include a WWW-Authen= ticate header field containing a
=A0;; challenge applicable to the requested resource. =A0The<= /font>
=A0;; client MAY repeat the req= uest with a suitable
=A0;; Authorization header field.

= =A0 =A0 =A0 =A0 =A0 ;; bug = patch because url-http-handle-authentication
=A0 =A0 =A0 =A0 =A0 ;; might return a ne= w buffer

= =A0 =A0 =A0 =A0 =A0 (let ((= retval (url-http-handle-authentication nil)))
=A0 =A0 =A0 =A0 =A0 =A0 (url-http-deb= ug "Url Http Parse Headers: handling authentication return buffer TO %= s" retval)
=A0 =A0 =A0 =A0 =A0 = =A0 (when retval
=A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; Put in the current buffer a forwardin= g pointer to the new
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 ;; destination buffer.
=A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; FIXME: This is a hack t= o fix url-retrieve-synchronously
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 ;; without changing the API. =A0Instead url-retrieve should<= /div>
=A0 =A0 =A0 =A0 = =A0 =A0 =A0 ;; either simply not return the "destination" buffer,= or it
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 ;; should take an optional `dest-buf' argument.
=A0 =A0 =A0 =A0 =A0 =A0 = =A0 (set (make-local-variable 'url-redirect-buffer)
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0retval)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 (url-http-debug "Url Http= Parse Headers: handling authentication return buffer TO %s -> %s 2:&quo= t;
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 retval url-redirect-buffer)<= /div>
=A0 =A0 =A0 =A0 = =A0 =A0 =A0 (url-mark-buffer-as-dead buffer))))
=A0 =A0 =A0 =A0 =A0
(payment-required = =A0 =A0 =A0 =A0 =A0 =A0 =A0; 402
=A0;; This code is reserved for= future use
=A0(url= -mark-buffer-as-dead buffer)
=A0(error "Somebody wants = you to give them money"))
(forbidden ; 403
=A0;; The server understood the= request, but is refusing to
=A0;; fulfill it. =A0Authorization will not help and the request<= /font>
=A0;; SHOULD NOT be repeated.
=A0(setq success t))=
(not-found ; 404
=A0;; Not found
=A0(setq success t))
(method-not-allowed ; 405
=A0;; The method specified in t= he Request-Line is not allowed
=A0;; for the resource identified by the Request-URI. =A0The
=A0;; response MUST include an = Allow header containing a list of
=A0;; valid methods for the requested resource.
=A0(setq success t))
(not-acceptable ; 406
=A0;; The resource identified b= y the request is only capable of
=A0;; generating response entities which have content<= /div>
=A0;; characteristics nota ccep= table according to the accept
=A0;; headers sent in the request.
=A0(setq success t))
(proxy-authentication-require= d ; 407
=A0;; This code is similar to 4= 01 (Unauthorized), but indicates
=A0;; that the client must first authenticate itself with the=
=A0;; proxy. =A0The proxy MUST = return a Proxy-Authenticate header
=A0;; field containing a challenge applicable to the proxy = for
=A0;; the requested resource.

=
=A0 =A0 =A0 =A0 =A0 ;;= bug patch because url-http-handle-authentication
=A0 =A0 =A0 =A0 =A0 ;; might return= a new buffer
=A0 =A0 =A0 =A0 =A0=A0=
=A0 =A0 = =A0 =A0 =A0 (let ((retval (url-http-handle-authentication t)))
=
=A0 =A0 =A0 =A0 =A0=A0=
=A0 =A0 =A0 =A0 =A0 = =A0 (when retval
=A0 =A0 =A0 =A0 =A0 =A0 ;; Put in the current buffer a forwarding po= inter to the new
=A0 ;; destination buffer.
=A0 ;; FIXME: This = is a hack to fix url-retrieve-synchronously
=A0 ;; without changing the AP= I. =A0Instead url-retrieve should
=A0 ;; either simply not return the "destination"= buffer, or it
=A0 ;; should take an optional= `dest-buf' argument.
= =A0 (set (make-local-variable 'url-redirect-buffer)
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 retval)
=A0 (url-mark-buffer-as-dead buffer))))
=A0 =A0 =A0 =A0 =A0=A0=
(request-timeout ; 408
=A0;; The client did not produc= e a request within the time that
=A0;; the server was prepared to wait. =A0The client MAY repe= at
=A0;; the request without modif= ications at any later time.
= =A0(setq success t))
(conflict ; 409
=A0;; The request could not be completed du= e to a conflict with
=A0;; the current state of the = resource. =A0This code is only
=A0;; allowed in situations where it is expected that the user<= /font>
=A0;; mioght be able to resolve= the conflict and resubmit the
=A0;; request. =A0The response body SHOULD include enough
=A0;; information for the user = to recognize the source of the
=A0;; conflict.
=A0(setq success t))
(gone =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0; 410
=A0;; The requested resource is= no longer available at the
= =A0;; server and no forwarding address is known.
=A0(setq success t))
(length-required ; 411
=A0;; The server refuses to acc= ept the request without a defined
=A0;; Content-Length. =A0The client MAY repeat the request i= f it
=A0;; adds a valid Content-Leng= th header field containing the
=A0;; length of the message-body in the request message.=
=A0;;
=A0;; NOTE - this will never happen because<= /font>
=A0;; `url-http-create-request&= #39; automatically calculates the
=A0;; content-length.
=A0(setq success t))
(precondition-failed ; 412
=A0;; The precondition given in= one or more of the
= =A0;; request-header fields evaluated to false when it was
=A0;; tested on the server.
=A0(setq success t))=
((request-entity-too-large requ= est-uri-too-large) ; 413 414
=A0;; The server is refusing to process a request because the
=A0;; request entity|URI is lar= ger than the server is willing or
=A0;; able to process.
=A0(setq success t))
(unsupported-media-type ; 415
=A0;; The server is refusing to= service the request because the
=A0;; entity of the request is in a format not supported by t= he
=A0;; requested resource for th= e requested method.
= =A0(setq success t))
(requested-range-not-satisfiabl= e ; 416
=A0;; A ser= ver SHOULD return a response with this status code if
=A0;; a request included a Rang= e request-header field, and none
=A0;; of the range-specifier values in this field overlap the=
=A0;; current extent of the sel= ected resource, and the request
=A0;; did not include an If-Range request-header field.=
=A0(setq success t))
(expectation-failed ; 417
=A0;; The expectation given in = an Expect request-header field
=A0;; could not be met by this server, or, if the server is a
=A0;; proxy, the server has una= mbiguous evidence that the
= =A0;; request could not be met by the next-hop server.
=A0(setq success t))
(otherwise
=A0;; The request could not be = understood by the server due to
=A0;; malformed syntax. =A0The client SHOULD NOT repeat the
=A0;; request without modificat= ions.
=A0(setq succ= ess t)))
=A0 =A0 =A0 =A0;; Tell= the callback that an error occurred, and what the
=A0 =A0 =A0 =A0;; status code was.=
=A0 =A0 =A0 =A0(when succes= s
(setf (car url-ca= llback-arguments)
=A0 =A0 =A0 (nconc (list :error= (list 'error 'http url-http-response-status))
=A0 =A0 =A0(car url-callback-arguments= )))))
=A0 =A0 =A0 (5<= /div>
=A0 =A0 =A0 =A0;;= 500 Internal server error
=A0 =A0 =A0 =A0;; 501 Not implemented
=A0 =A0 =A0 =A0;; 502 = Bad gateway
=A0 =A0 =A0 =A0;; 504 Gateway time-out
=A0 =A0 =A0 =A0;; 505 = HTTP version not supported
=A0 =A0 =A0 =A0;; 507 Insufficient storage
=A0 =A0 =A0 =A0(setq succ= ess t)
=A0 =A0 =A0 =A0(case u= rl-http-response-status
(not-implemented ; 501
=A0;; The server does not suppo= rt the functionality required to
=A0;; fulfill the request.
=A0nil)
(bad-gateway ; 502
=A0;; The server, while acting = as a gateway or proxy, received
=A0;; an invalid response from the upstream server it accessed=
=A0;; in attempting to fulfill = the request.
=A0nil= )
(service-unavailable ; 503
=A0;; The server is currently una= ble to handle the request due
=A0;; to a temporary overloadin= g or maintenance of the server.
=A0;; The implication is that this is a temporary condition
=A0;; which will be alleviated = after some delay. =A0If known, the
=A0;; length of the delay MAY be indicated in a Retry-After=
=A0;; header. =A0If no Retry-Af= ter is given, the client SHOULD
=A0;; handle the response as it would for a 500 response.
=A0nil)
(gateway-timeout ; 504
=A0;; The server, while acting = as a gateway or proxy, did not
=A0;; receive a timely response from the upstream server=
=A0;; specified by the URI (e.g= . HTTP, FTP, LDAP) or some other
=A0;; auxiliary server (e.g. DNS) it needed to access in
=A0;; attempting to complete th= e request.
=A0nil)<= /font>
(http-version-not-supported ; 505
=A0;; The server does not support, o= r refuses to support, the
<= /span> =A0;; HTTP protocol version that was used in the request
=A0;; message.
=A0nil)
(insufficient-storage ; 507 (DAV)<= /div>
=A0;; The method could not be perfor= med on the resource
= =A0;; because the server is unable to store the representation
=A0;; needed to successfully co= mplete the request. =A0This
= =A0;; condition is considered to be temporary. =A0If the request
=A0;; which received this statu= s code was the result of a user
=A0;; action, the request MUST NOT be repeated until it is
=A0;; requested by a separate u= ser action.
=A0nil)= )
=A0 =A0 =A0 =A0;; Tell= the callback that an error occurred, and what the
=A0 =A0 =A0 =A0;; status code was.=
=A0 =A0 =A0 =A0(when succes= s
(setf (car url-ca= llback-arguments)
=A0 =A0 =A0 (nconc (list :error= (list 'error 'http url-http-response-status))
=A0 =A0 =A0(car url-callback-arguments= )))))
=A0 =A0 =A0 (otherwise=
=A0 =A0 = =A0 =A0(error "Unknown class of HTTP response code: %d (%d)"
=A0 =A0 =A0class url-ht= tp-response-status)))
=A0 =A0 (if (not succe= ss)
(url-mark-buffer= -as-dead buffer))
=A0 =A0 (url-http-debu= g "Finished parsing HTTP headers: %S" success)
<= font face=3D"'courier new', monospace">=A0 =A0 (widen)
=
=A0 =A0 success))



--14dae934061b6b464204b63bf1f8-- From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: Possible fix?? Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Jan 2012 09:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jerry Asher Cc: 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.132627497332396 (code B ref 10478); Wed, 11 Jan 2012 09:43:02 +0000 Received: (at 10478) by debbugs.gnu.org; 11 Jan 2012 09:42:53 +0000 Received: from localhost ([127.0.0.1]:53321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rkuhn-0008QQ-Ve for submit@debbugs.gnu.org; Wed, 11 Jan 2012 04:42:52 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:34178) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1Rkuhk-0008QH-CI for 10478@debbugs.gnu.org; Wed, 11 Jan 2012 04:42:49 -0500 Received: (qmail invoked by alias); 11 Jan 2012 09:42:22 -0000 Received: from p57BB9657.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.150.87] by mail.gmx.net (mp059) with SMTP; 11 Jan 2012 10:42:22 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+yn3d29fWyC7yazoswCVfhkGeXjJRK0oJIM9ZoJ8 K7sJaeQ6TwEEyZ From: Michael Albinus References: Date: Wed, 11 Jan 2012 10:42:07 +0100 In-Reply-To: (Jerry Asher's message of "Wed, 11 Jan 2012 00:54:15 -0700") Message-ID: <8762gi7ez4.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 (-) Jerry Asher writes: Hi, > The following, ugly, changes in url-http.el seem to work, based on > very very very limited testing.... > > Basically, > > I changed url-http-handle-authentication so that if a change of buffer > was made, it would return the new buffer, otherwise it would return > nil. > > Then in=C2=A0 url-http-parse-headers,=C2=A0I=C2=A0cut and pasted code for= the 3XX > redirect case that sets a flag for url-retrieve-synchronously to do > the same thing for the =C2=A0401 and 407 cases. Maybe there is a simple solution, using `save-current-buffer'? Best regards, Michael. From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Dec 2015 21:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jerry Asher Cc: 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.145108016917015 (code B ref 10478); Fri, 25 Dec 2015 21:50:01 +0000 Received: (at 10478) by debbugs.gnu.org; 25 Dec 2015 21:49:29 +0000 Received: from localhost ([127.0.0.1]:35617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCaEr-0004QN-1X for submit@debbugs.gnu.org; Fri, 25 Dec 2015 16:49:29 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:57719) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCaEp-0004QG-SP for 10478@debbugs.gnu.org; Fri, 25 Dec 2015 16:49:28 -0500 Received: from 2.150.58.24.tmi.telenormobil.no ([2.150.58.24] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aCaEU-0004xW-H5; Fri, 25 Dec 2015 22:49:06 +0100 From: Lars Ingebrigtsen References: Date: Fri, 25 Dec 2015 22:49:05 +0100 In-Reply-To: (Jerry Asher's message of "Wed, 11 Jan 2012 00:03:06 -0700") Message-ID: <8737uqyzam.fsf@gnus.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aCaEU-0004xW-H5 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1451684946.72154@kmMvqhqenpSgJw6lemulcg X-Spam-Status: No X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jerry Asher writes: > When making a GET request again their simplest api, users/me that > returns information about the logged in user, url-retrieve-synchronously > will return the wrong buffer. > > This seems to be traceable to url-http-parse-headers handling the "401 > Basic: Access denied message by" calling url-http-handle-authentication > which prompts the user for a name and password and calls > url-retrieve-internal to retry the request. I can confirm that this bug is still present in Emacs 25. It returns the buffer with the 401 message, not the buffer with the response... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 25 16:49:34 2015 Received: (at control) by debbugs.gnu.org; 25 Dec 2015 21:49:34 +0000 Received: from localhost ([127.0.0.1]:35620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCaEw-0004Qf-84 for submit@debbugs.gnu.org; Fri, 25 Dec 2015 16:49:34 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:57725) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCaEu-0004QX-Bz for control@debbugs.gnu.org; Fri, 25 Dec 2015 16:49:32 -0500 Received: from 2.150.58.24.tmi.telenormobil.no ([2.150.58.24] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aCaEZ-0004xf-0e for control@debbugs.gnu.org; Fri, 25 Dec 2015 22:49:11 +0100 Date: Fri, 25 Dec 2015 22:49:10 +0100 Message-Id: <871taayzah.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #10478 X-MailScanner-ID: 1aCaEZ-0004xf-0e X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1451684951.76627@X7Dxo42UIJIbKp7f4GyuPQ X-Spam-Status: No X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 10478 confirmed From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: David Engster Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2017 10:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Lars Ingebrigtsen Cc: Jerry Asher , 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.149648651830509 (code B ref 10478); Sat, 03 Jun 2017 10:42:02 +0000 Received: (at 10478) by debbugs.gnu.org; 3 Jun 2017 10:41:58 +0000 Received: from localhost ([127.0.0.1]:52410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH6VJ-0007w0-Pd for submit@debbugs.gnu.org; Sat, 03 Jun 2017 06:41:57 -0400 Received: from randomsample.de ([5.45.97.173]:37701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH6VH-0007vq-Ff for 10478@debbugs.gnu.org; Sat, 03 Jun 2017 06:41:55 -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=Xk/Nnz3BZ+9lEIcAG63CkvNrq0kgYg+fIttzcYO1DWA=; b=KBzus9bo6yDbIXVy12tTd1fNZ4V3kS+XuQrXgr0BBHS4ZTtjA0v2p8HB/613baAV84sYeAB8alPEh7suONyZ1b7xSeyugiSAIyVPbmb4ph+afPajawmuxdqd4MnSEHpO; Received: from ip4d1681d2.dynamic.kabel-deutschland.de ([77.22.129.210] helo=isaac) by randomsample.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1dH6VF-00030Z-4Q; Sat, 03 Jun 2017 12:41:53 +0200 From: David Engster In-Reply-To: <8737uqyzam.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 25 Dec 2015 22:49:05 +0100") References: <8737uqyzam.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Date: Sat, 03 Jun 2017 12:41:47 +0200 Message-ID: <87y3t9xsic.fsf@engster.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Lars Ingebrigtsen writes: > Jerry Asher writes: > >> When making a GET request again their simplest api, users/me that >> returns information about the logged in user, url-retrieve-synchronously >> will return the wrong buffer. >> >> This seems to be traceable to url-http-parse-headers handling the "401 >> Basic: Access denied message by" calling url-http-handle-authentication >> which prompts the user for a name and password and calls >> url-retrieve-internal to retry the request. > > I can confirm that this bug is still present in Emacs 25. It returns > the buffer with the 401 message, not the buffer with the response... I just stumpled upon this. Oh my, this stuff is straight from callback hell. Lars, how's your 'url' rewrite going...? I stared at this for hours, but was unable to come up with anything better than what Jerry has suggested. So if nobody objects, I'd like to commit this. Jerry, do you have papers with the FSF signed? I'm not sure if the resulting patch will fit in the 'trivial patch' category. -David From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2017 11:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: David Engster Cc: Jerry Asher , 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.149648788232628 (code B ref 10478); Sat, 03 Jun 2017 11:05:02 +0000 Received: (at 10478) by debbugs.gnu.org; 3 Jun 2017 11:04:42 +0000 Received: from localhost ([127.0.0.1]:52423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH6rK-0008UC-7s for submit@debbugs.gnu.org; Sat, 03 Jun 2017 07:04:42 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:47238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH6rH-0008U2-SB for 10478@debbugs.gnu.org; Sat, 03 Jun 2017 07:04:41 -0400 Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dH6rC-0006f9-BN; Sat, 03 Jun 2017 13:04:36 +0200 From: Lars Ingebrigtsen References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEWcBQ+cLEeOAQGvzu2w AACtAADJEDa7AAC0CR29AABWhdCOAwa3AABHb8GxAACdAABereY7AAABz0lEQVQ4ja2UsUoDQRCG rxUbDyGagBZXCRYi2y2ks7HRylYQ4fB8Au0MiHCFRQjEWzFFCFgMLIjtPUCaFKbTxelsBMkzOLO7 dyaXiI1T3A3z3czOzj9JkDt7yltXAVv+ZF/LQeRJ/hxF7G/nkXWCaPu5CM9YYJ9zYQZb8QL7EyjV LWPsKgY7qrDuWenOgimzoB2GQjQRx+sVcA8DIQQAaKXiWpz8AI4z0aq7qkON9QLYuJAEziXwOy0z JIAt1QAptIE3B3oUAiQbq4ZhHx5LsHI9tM00AIXkL3xXet93uYFmQGV1akEHsASgwwFA32V0ZJnR MrX4xIxrHohmyEYgW6fr8Uw9kAhC4/iyMhLqioYiNb66GcfpD7A312hBXJZqoxuW5CFZxZIpPS5a BN58RjIj1Cngi3WyioI9oFHMSUvntXEe8IFphtivArs2d0bsLgJJtgBQqZTP6PM3aTepdIXU7o3f RnfzugW3iO/Kr2niZoVrLAWJXs88cAr2DKLRvA1LPsOPhIobQXoU96PdvvOAd1QC1stuHcjMwC7i i6oAlTV4LzfVHCA1wuBzKq4efvvh/ApsqehhOByNJpOvET+PJwcfe0eHxR/AAvtH8A2CVPdeFYG7 pAAAAABJRU5ErkJggg== Date: Sat, 03 Jun 2017 13:04:34 +0200 In-Reply-To: <87y3t9xsic.fsf@engster.org> (David Engster's message of "Sat, 03 Jun 2017 12:41:47 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) David Engster writes: > I just stumpled upon this. Oh my, this stuff is straight from callback > hell. Lars, how's your 'url' rewrite going...? It's basically usable, but I haven't had time to finish it up, write the documentation and merge it yet... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2017 11:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: David Engster Cc: larsi@gnus.org, jerry.asher@gmail.com, 10478@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.1496487962307 (code B ref 10478); Sat, 03 Jun 2017 11:07:01 +0000 Received: (at 10478) by debbugs.gnu.org; 3 Jun 2017 11:06:02 +0000 Received: from localhost ([127.0.0.1]:52427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH6sb-0008WV-In for submit@debbugs.gnu.org; Sat, 03 Jun 2017 07:06:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH6sZ-0008WC-Lt for 10478@debbugs.gnu.org; Sat, 03 Jun 2017 07:05:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dH6sR-0000AR-9v for 10478@debbugs.gnu.org; Sat, 03 Jun 2017 07:05:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dH6sR-0000A7-5r; Sat, 03 Jun 2017 07:05:51 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4802 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dH6sQ-0001Z0-2V; Sat, 03 Jun 2017 07:05:50 -0400 Date: Sat, 03 Jun 2017 14:05:35 +0300 Message-Id: <83k24tbabk.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87y3t9xsic.fsf@engster.org> (message from David Engster on Sat, 03 Jun 2017 12:41:47 +0200) References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: David Engster > Date: Sat, 03 Jun 2017 12:41:47 +0200 > Cc: Jerry Asher , 10478@debbugs.gnu.org > > I'm not sure if the resulting patch will fit in the 'trivial patch' > category. It's hard to tell, as no diffs were posted. Would it be possible to extract the error-handling part into a separate function, so that the actual changes would be as short as possible? Then we could see if they are short enough to accept without papers. Thanks. From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Jerry Asher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2017 12:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: larsi@gnus.org, David Engster , 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.149649459317394 (code B ref 10478); Sat, 03 Jun 2017 12:57:02 +0000 Received: (at 10478) by debbugs.gnu.org; 3 Jun 2017 12:56:33 +0000 Received: from localhost ([127.0.0.1]:52468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH8bY-0004WT-Ld for submit@debbugs.gnu.org; Sat, 03 Jun 2017 08:56:33 -0400 Received: from mail-qt0-f182.google.com ([209.85.216.182]:35353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH8bV-0004WF-W1 for 10478@debbugs.gnu.org; Sat, 03 Jun 2017 08:56:30 -0400 Received: by mail-qt0-f182.google.com with SMTP id w1so48760292qtg.2 for <10478@debbugs.gnu.org>; Sat, 03 Jun 2017 05:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bqwqZ6YiI+/V6smDgtDDzh2cnw5M7iRvhYguFSbfSzI=; b=YBmtVUEHPvUbq5o8TD4huGbeSxO6nDXn32A5v7ogqWTAmaIsDM6PZjHkcipF4o6GLM zvWRvSCNJw/1zQim3C2pMOkf8/uijUWIZ9f4Umu3D8GzQyQIIkXR0HJwFv6OD8w+D+Ou 1vWYP2dfjDf5KcVBSL8C2/ilwLW1G5akPwAnNBmTUP4fy+9x74kNPOEnaUabfpNsEkto EdvZmiaxC8apbXdXoYjzAii3YhkBlAUOLMBNk4NJ+DKz7z05SiXmfVvsDN+HbYuw4fau m5w2nspnw541xOcpDWv7CmNLxfZ1igubAogGIqcgXKTVUH7Ybhoevx/Q/8dRVV/7Z0Yj tklQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bqwqZ6YiI+/V6smDgtDDzh2cnw5M7iRvhYguFSbfSzI=; b=pW780f2ISg8ybf62aRmaipfGUWRr1ZHJm7hvp2S7u86CCZ3w9zWXkHjaQEXyQ1ax6L AjacySWbenVp3XDdWmVoe2lDhknfA8s80vL8/TFZpTDoashrz51TcfLMpQ6nNGD0rpdA tMpGtxFENZgwr5Q/cP6h65rzFsEGVX3mtDSY7t8d7tKEKwXZm7w+QQ1ztusI1uxNfDxP A8Vurc232E8asAFw1YjQekTQmzZq6Ax3i3UJG2qmhRqZmX7wqWQ12gra3hc80k6q4Kgq +QWIZckKFxuZbnRx7adoxR/5od/GCwYqwpwsxDGkWU3tBZ41EGSk+Zy3SYdgQwKrMqtu +YSQ== X-Gm-Message-State: AKS2vOxMrKj4sRZBsZH49TLg7qHf3QwcRzlvGI7PY4Z/eXD7CSUMLxWA NZ97YZiH4tm+ri5h0vPap2pxHN+oXQ== X-Received: by 10.237.54.225 with SMTP id f88mr953193qtb.63.1496494584249; Sat, 03 Jun 2017 05:56:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.47.35 with HTTP; Sat, 3 Jun 2017 05:56:03 -0700 (PDT) In-Reply-To: <83k24tbabk.fsf@gnu.org> References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> <83k24tbabk.fsf@gnu.org> From: Jerry Asher Date: Sat, 3 Jun 2017 05:56:03 -0700 Message-ID: Content-Type: multipart/alternative; boundary="001a114342101a473705510dcc77" X-Spam-Score: -0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) --001a114342101a473705510dcc77 Content-Type: text/plain; charset="UTF-8" So here's my analysis of what I did back then. I think it was short and even straight-forward, anyone is welcome to rewrite or reimplement it. Enough cleanup has happened in url-http.el that it makes it difficult to simply give you a diff today. I don't even know where to get the code as it was in 2012 to compare my patch from back then to. But there were "two" bugs. Bug one: in url-http-handle-authentication, there is a call to url-retrieve-internal, and that function can return a new buffer with the contents of the url, but url-http-handle-authentication does not return the new buffer with the new contents. It drops it on the floor. So all I did, literally, was to capture the return value and then change url-http-handle-authentication throughout so that the the new url contents would be passed back. in url-http-handle-authentication, the end of the function goes from: (if (not (url-auth-registered type)) (progn (widen) (goto-char (point-max)) (insert "
Sorry, but I do not know how to handle " (or type auth url "") " authentication. If you'd like to write it," " please use M-x report-emacs-bug RET.
") ;; We used to set a `status' var (declared "special") but I can't ;; find the corresponding let-binding, so it's probably an error. ;; FIXME: Maybe it was supposed to set `success', i.e. to return t? ;; (setq status t) * nil) ;; Not success yet.* (let* ((args (url-parse-args (subst-char-in-string ?, ?\; auth))) (auth (url-get-authentication auth-url (cdr-safe (assoc "realm" args)) type t args))) (if (not auth) t ;Success. (push (cons (if proxy "Proxy-Authorization" "Authorization") auth) url-http-extra-headers) (let ((url-request-method url-http-method) (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers)) * (url-retrieve-internal url url-callback-function* * url-callback-arguments))* * nil))))) ;; Not success yet.* to (if (not (url-auth-registered type)) (progn (widen) (goto-char (point-max)) (insert "
Sorry, but I do not know how to handle " type " authentication. If you'd like to write it," " send it to " url-bug-address ".
") (setq status t) *(setq retval nil)*) (let* ((args (url-parse-args (subst-char-in-string ?, ?\; auth))) (auth (url-get-authentication auth-url (cdr-safe (assoc "realm" args)) type t args))) (if (not auth) (progn (setq success t) *(set retval nil)*) (push (cons (if proxy "Proxy-Authorization" "Authorization") auth) url-http-extra-headers) (let ((url-request-method url-http-method) (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers) * (response-buffer nil)*) * (setq response-buffer* * (url-retrieve-internal url url-callback-function* * url-callback-arguments))* (url-http-debug "Handling authentication return buffer is %s" response-buffer) *(setq retval response-buffer)*)))) (url-http-debug "Handling authentication retval is %s 2:" retval) * retval))* At an appropriate place above this, the declaration of retval is stuffed into an existing let. The next bug occurs in url-http-parse-headers where the 401 and 407 cases which deal with authentication do not take into account that the url contents may have changed as a result of authentication. And there all I did was to cut and paste the previously self-declared hack from the 3XX case in. So the 3XX case had this code already in it (progn ;; Remember that the request was redirected. (setf (car url-callback-arguments) (nconc (list :redirect redirect-uri) (car url-callback-arguments))) * ;; Put in the current buffer a forwarding pointer to the new* * ;; destination buffer.* * ;; FIXME: This is a hack to fix url-retrieve-synchronously* * ;; without changing the API. Instead url-retrieve should* * ;; either simply not return the "destination" buffer, or it* * ;; should take an optional `dest-buf' argument.* * (set (make-local-variable 'url-redirect-buffer)* * (url-retrieve-internal* * redirect-uri url-callback-function* * url-callback-arguments* * (url-silent url-current-object)))* * (url-mark-buffer-as-dead buffer))* I diligently copied that code into the 401 and 407 cases. (`unauthorized ; 401 ;; The request requires user authentication. The response ;; MUST include a WWW-Authenticate header field containing a ;; challenge applicable to the requested resource. The ;; client MAY repeat the request with a suitable ;; Authorization header field. (url-http-handle-authentication nil)) to (unauthorized ; 401 ;; The request requires user authentication. The response ;; MUST include a WWW-Authenticate header field containing a ;; challenge applicable to the requested resource. The ;; client MAY repeat the request with a suitable ;; Authorization header field. ;; bug patch because url-http-handle-authentication ;; might return a new buffer (let ((retval (url-http-handle-authentication nil))) (url-http-debug "Url Http Parse Headers: handling authentication return buffer TO %s" retval) (when retval ;; Put in the current buffer a forwarding pointer to the new ;; destination buffer. ;; FIXME: This is a hack to fix url-retrieve-synchronously ;; without changing the API. Instead url-retrieve should ;; either simply not return the "destination" buffer, or it ;; should take an optional `dest-buf' argument. (set (make-local-variable 'url-redirect-buffer) retval) (url-http-debug "Url Http Parse Headers: handling authentication return buffer TO %s -> %s 2:" retval url-redirect-buffer) (url-mark-buffer-as-dead buffer)))) And I did the same thing for the 407 case. I didn't test it much back in 2012. It worked for my needs against posterous, which then went belly up. You should probably test this now more than I did then, when I wasn't writing so much of a patch, as indicating where the bugs were and the proper fixes needed to apply. I hope that helps, Jerry On Sat, Jun 3, 2017 at 4:05 AM, Eli Zaretskii wrote: > > From: David Engster > > Date: Sat, 03 Jun 2017 12:41:47 +0200 > > Cc: Jerry Asher , 10478@debbugs.gnu.org > > > > I'm not sure if the resulting patch will fit in the 'trivial patch' > > category. > > It's hard to tell, as no diffs were posted. > > Would it be possible to extract the error-handling part into a > separate function, so that the actual changes would be as short as > possible? Then we could see if they are short enough to accept > without papers. > > Thanks. > --001a114342101a473705510dcc77 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
So here's my analysis of what I did back then. I think= it was short and even straight-forward, anyone is welcome to rewrite or re= implement it.

Enough cle= anup has happened in url-http.el that it makes it difficult to simply give = you a diff today. I don't even know where to get the code as it was in = 2012 to compare my patch from back then to.

But there were "two&qu= ot; bugs.

Bug one: in=C2=A0url-http-handle-authentication, there i= s a call to url-retrieve-internal, and that function can return a new buffe= r with the contents of the url, but url-http-handle-authentication does not= return the new buffer with the new contents. It drops it on the floor.

So all I did, literally, was to capture the return value and then change u= rl-http-handle-authentication throughout so that the the new url contents w= ould be passed back.

in url-http-handle-authentication, the end of= the function goes from:

=C2= =A0 =C2=A0 (if (not (url-auth-registered type))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (progn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (= widen)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (goto-char (point-max))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (insert "<= ;hr>Sorry, but I do not know how to handle " (or type auth url &quo= t;")
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " authentication.= =C2=A0 If you'd like to write it,"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 " please use M-x report-emacs-bug RET.<hr>")
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ;; We used to set a `status' var (declared "special&quo= t;) but I can't
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; find the corresponding let-binding, s= o it's probably an error.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; FIXME: Maybe it was supposed = to set `success', i.e. to return t?
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; (setq status t)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 nil) ;; Not success yet.

=C2=A0 =C2=A0 =C2=A0 (let* ((args (url-parse-args (subst-char-i= n-string ?, ?\; auth)))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(c= dr-safe (assoc "realm" args))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0type t args)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (not auth)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 t =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 ;Success.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (push (cons (if proxy "= ;Proxy-Authorization" "Authorization") auth)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 url-http-extra-headers)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((url-reques= t-method url-http-method)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-request-da= ta url-http-data)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-request-extra-hea= ders url-http-extra-headers))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-retrieve-inter= nal url url-callback-function
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ur= l-callback-arguments))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nil))))) ;; Not success y= et.


to


=C2=A0 =C2=A0 (i= f (not (url-auth-registered type))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (progn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (widen)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (goto-char (point-max))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (insert "<hr>Sorry, = but I do not know how to handle " type
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 " authentication.=C2=A0 If you'd like to write it,"= ;
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " send it to " url-bug= -address ".<hr>")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq status t)
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= (setq retval nil))

=C2= =A0 =C2=A0 =C2=A0 (let* ((args (url-parse-args (subst-char-in-string ?, ?\;= auth)))
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(auth (url-get-authentication auth-url
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cdr-safe (assoc= "realm" args))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0type t args)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (not auth)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (progn<= /font>
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq success t)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = (set retval nil))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (push (cons (if proxy "Proxy= -Authorization" "Authorization") auth)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 url-http-extra-headers)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((url-request-metho= d url-http-method)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-request-data url-= http-data)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-request-extra-headers ur= l-http-extra-headers)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (response-buf= fer nil))
<= i>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq response-buffer
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-retrieve-internal url ur= l-callback-function
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0url-callback-arguments))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-http-de= bug "Handling authentication return buffer is %s"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 response-buf= fer)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (setq retval response-buffer)))))
=C2=A0 =C2=A0 (url-http-= debug "Handling authentication retval is %s 2:" retval)
=C2=A0 =C2=A0 retval))


At an appr= opriate place above this, the declaration of=C2=A0retval=C2=A0is stuffed into an existing let.

The next bug occurs in url-http-parse-h= eaders where the 401 and 407 cases which deal with authentication do not ta= ke into account that the url contents may have changed as a result of authe= ntication. And there all I did was to cut and paste the previously self-dec= lared hack from the 3XX case in.

So the 3X= X case had this code already in it

=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(progn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Remember that the request was redirected.=
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setf (car url-callback-arg= uments)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(nconc (list :redirect redirect-uri)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (car url-callback-a= rguments)))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Put in= the current buffer a forwarding pointer to the new
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; destination buffer.=
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; FIXME: This is a hack to= fix url-retrieve-synchronously
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0;; without changing the API.=C2=A0 Instead url-retrieve= should
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; eit= her simply not return the "destination" buffer, or it
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; should take an optio= nal `dest-buf' argument.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(set (make-local-variable 'url-redirect-buffer)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-= retrieve-internal
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0redirect-uri url-callback-function
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0url-ca= llback-arguments
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(url-silent url-current-object)))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(url-mark-buffer-as-dead buffe= r))

I dilige= ntly copied that code into the 401 and 407 cases.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(`unauthorized = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ; 401
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = ;; The request requires user authentication.=C2=A0 The response
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 ;; MUST include a WWW-Authenticate header field co= ntaining a
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; challenge applicable to th= e requested resource.=C2=A0 The
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; client= MAY repeat the request with a suitable
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;= ; Authorization header field.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-http-h= andle-authentication nil))

to


=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(unauthorized =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0; 401
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 ;; The request requires user authentication.=C2=A0= The response
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; MUST include a WWW-Authenticate header field= containing a
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; challenge applicable to the requested resour= ce.=C2=A0 The
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; client MAY repeat the request with a suitabl= e
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 ;; Authorization header field.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; bug patch because url-http-h= andle-authentication
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; might return a new buffer

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((retval = (url-http-handle-authentication nil)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-http-d= ebug "Url Http Parse Headers: handling
authentication return buffer TO %s" retval)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (when retval
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; Put in the cur= rent buffer a forwarding pointer to the new
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; d= estination buffer.
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; FIXME: This is a hack to f= ix url-retrieve-synchronously
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; without changin= g the API.=C2=A0 Instead url-retrieve should
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; = either simply not return the "destination" buffer, or it
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 ;; should take an optional `dest-buf' argument.
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (set (make-local-variable 'url-redirect-buffer= )
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retval)
<= font face=3D"monospace, monospace">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (url-http-debug "Url Http Parse Headers: handling
authentication return buffer TO= %s -> %s 2:"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 retval url-redirect-buffer)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (url-mark-buffer-as-dead buffer))))


And I did the same thing for the 407 case.
=

I didn't test it much back in 2012. It worked for my needs against= posterous, which then went belly up. You should probably test this now mor= e than I did then, when I wasn't writing so much of a patch, as indicat= ing where the bugs were and the proper fixes needed to apply.

I h= ope that helps,=C2=A0

Jerry

<= div class=3D"gmail_quote">On Sat, Jun 3, 2017 at 4:05 AM, Eli Zaretskii <eliz@g= nu.org> wrote:
> From: D= avid Engster <deng@randomsample.= de>
> Date: Sat, 03 Jun 2017 12:41:47 +0200
> Cc: Jerry Asher <jerry.ash= er@gmail.com>, 10478@debbug= s.gnu.org
>
> I'm not sure if the resulting patch will fit in the 'trivial p= atch'
> category.

It's hard to tell, as no diffs were posted.

Would it be possible to extract the error-handling part into a
separate function, so that the actual changes would be as short as
possible?=C2=A0 Then we could see if they are short enough to accept
without papers.

Thanks.

--001a114342101a473705510dcc77-- From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: David Engster Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Jun 2017 20:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Jerry Asher Cc: Eli Zaretskii , larsi@gnus.org, 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.14969525219913 (code B ref 10478); Thu, 08 Jun 2017 20:09:01 +0000 Received: (at 10478) by debbugs.gnu.org; 8 Jun 2017 20:08:41 +0000 Received: from localhost ([127.0.0.1]:35494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJ3jV-0002Zo-JG for submit@debbugs.gnu.org; Thu, 08 Jun 2017 16:08:41 -0400 Received: from randomsample.de ([5.45.97.173]:53491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJ3jU-0002Zf-I6 for 10478@debbugs.gnu.org; Thu, 08 Jun 2017 16:08:41 -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=ZMreXGCbI3Il0HqiLkCeqxQThS2o/PWGKirz0Lq0dQc=; b=LKH9IQvIgX1KtRHmbS2OVyqqsXu9oi/4tUEr6zUiTxylS6sb+We6RtvsM6L+xrAYtfKWLtQ7/IE/V0H1umTyTYG6aitMAfXs6tIH8zDROG3fIipmXXCgM4ah8022tsYJ; Received: from [77.22.129.210] (helo=isaac) by randomsample.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1dJ3jS-0007aU-1W; Thu, 08 Jun 2017 22:08:38 +0200 From: David Engster In-Reply-To: (Jerry Asher's message of "Sat, 3 Jun 2017 05:56:03 -0700") References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> <83k24tbabk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Date: Thu, 08 Jun 2017 22:08:30 +0200 Message-ID: <874lvqgs3l.fsf@engster.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Jerry Asher writes: > The next bug occurs in url-http-parse-headers where the 401 and 407 cases= which > deal with authentication do not take into account that the url contents m= ay > have changed as a result of authentication. And there all I did was to cu= t and > paste the previously self-declared hack from the 3XX case in. [...] > =A0 =A0 =A0 =A0 =A0(unauthorized =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0; 401 > =A0 =A0 =A0 =A0 =A0 ;; The request requires user authentication.=A0 The r= esponse > =A0 =A0 =A0 =A0 =A0 ;; MUST include a WWW-Authenticate header field conta= ining a > =A0 =A0 =A0 =A0 =A0 ;; challenge applicable to the requested resource.=A0= The > =A0 =A0 =A0 =A0 =A0 ;; client MAY repeat the request with a suitable > =A0 =A0 =A0 =A0 =A0 ;; Authorization header field. > > =A0 =A0 =A0 =A0 =A0 ;; bug patch because url-http-handle-authentication > =A0 =A0 =A0 =A0 =A0 ;; might return a new buffer > > =A0 =A0 =A0 =A0 =A0 (let ((retval (url-http-handle-authentication nil))) > =A0 =A0 =A0 =A0 =A0 =A0 (url-http-debug "Url Http Parse Headers: handling > authentication return buffer TO %s" retval) > =A0 =A0 =A0 =A0 =A0 =A0 (when retval > =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; Put in the current buffer a forwarding poi= nter to the new > =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; destination buffer. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; FIXME: This is a hack to fix url-retrieve-= synchronously > =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; without changing the API.=A0 Instead url-r= etrieve should > =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; either simply not return the "destination"= buffer, or it > =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; should take an optional `dest-buf' argumen= t. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (set (make-local-variable 'url-redirect-buffe= r) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0retval) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (url-http-debug "Url Http Parse Headers: hand= ling > authentication return buffer TO %s -> %s 2:" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 retval url-re= direct-buffer) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (url-mark-buffer-as-dead buffer)))) That did not work for me. The reason is that at the end of this block, `url-mark-buffer-as-dead' will return non-nil, so the 'success'-flag will be set. If the callback is called immediately because Content-Length is '0' (which is often the case for '401'), `url-retrieve-synchronously' won't look at the url-redirect-buffer variable. So I let that block always return 'nil' and that seems to do the trick, but I'll do some more testing. In the meantime, I'll send you the form for assigning copyright to the FSF in a separate mail. [Whether a patch is considered 'trivial' almost entirely depends on quantity. The general rule is: If the amount of added lines is below ~10, it is considered trivial, otherwise papers are required.] -David From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2019 06:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: David Engster Cc: Eli Zaretskii , Jerry Asher , 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.15693081177694 (code B ref 10478); Tue, 24 Sep 2019 06:56:02 +0000 Received: (at 10478) by debbugs.gnu.org; 24 Sep 2019 06:55:17 +0000 Received: from localhost ([127.0.0.1]:37495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCejE-000201-NM for submit@debbugs.gnu.org; Tue, 24 Sep 2019 02:55:16 -0400 Received: from quimby.gnus.org ([80.91.231.51]:56996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCejC-0001zr-Ca for 10478@debbugs.gnu.org; Tue, 24 Sep 2019 02:55:14 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCej8-0002Tg-KC; Tue, 24 Sep 2019 08:55:13 +0200 From: Lars Ingebrigtsen References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> <83k24tbabk.fsf@gnu.org> <874lvqgs3l.fsf@engster.org> Date: Tue, 24 Sep 2019 08:55:10 +0200 In-Reply-To: <874lvqgs3l.fsf@engster.org> (David Engster's message of "Thu, 08 Jun 2017 22:08:30 +0200") Message-ID: <87sgom2ng1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: I tried reproducing this bug again now, but I seem to be unable to. Has somebody finally fixed it? Here's my test case: (pop-to-buffer (url-retrieve-synchronously "https://jigsaw.w3.org/HTTP/Basic/")) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I tried reproducing this bug again now, but I seem to be unable to. Has somebody finally fixed it? Here's my test case: (pop-to-buffer (url-retrieve-synchronously "https://jigsaw.w3.org/HTTP/Basic/")) the user name/password is guest/guest. I'm prompted for that, and the buffer I'm popped to is the "your browser made it" buffer, so it seems to work for me? Does it work for you, too? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 24 02:55:22 2019 Received: (at control) by debbugs.gnu.org; 24 Sep 2019 06:55:22 +0000 Received: from localhost ([127.0.0.1]:37498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCejK-00020O-04 for submit@debbugs.gnu.org; Tue, 24 Sep 2019 02:55:22 -0400 Received: from quimby.gnus.org ([80.91.231.51]:57014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCejH-00020D-J9 for control@debbugs.gnu.org; Tue, 24 Sep 2019 02:55:20 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCejE-0002Tr-SP for control@debbugs.gnu.org; Tue, 24 Sep 2019 08:55:18 +0200 Date: Tue, 24 Sep 2019 08:55:16 +0200 Message-Id: <87r2462nfv.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #10478 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 10478 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 10478 + moreinfo quit From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2019 07:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed moreinfo To: Lars Ingebrigtsen Cc: jerry.asher@gmail.com, deng@randomsample.de, 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.156930935117941 (code B ref 10478); Tue, 24 Sep 2019 07:16:01 +0000 Received: (at 10478) by debbugs.gnu.org; 24 Sep 2019 07:15:51 +0000 Received: from localhost ([127.0.0.1]:37523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCf38-0004fH-PG for submit@debbugs.gnu.org; Tue, 24 Sep 2019 03:15:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCf36-0004ey-Ba for 10478@debbugs.gnu.org; Tue, 24 Sep 2019 03:15:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iCf30-0005f0-Jq; Tue, 24 Sep 2019 03:15:42 -0400 Received: from [176.228.60.248] (port=1608 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iCf2z-00051G-SV; Tue, 24 Sep 2019 03:15:42 -0400 Date: Tue, 24 Sep 2019 10:15:26 +0300 Message-Id: <83zhiunp0x.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87sgom2ng1.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 24 Sep 2019 08:55:10 +0200) References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> <83k24tbabk.fsf@gnu.org> <874lvqgs3l.fsf@engster.org> <87sgom2ng1.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Jerry Asher , Eli Zaretskii , > 10478@debbugs.gnu.org > Date: Tue, 24 Sep 2019 08:55:10 +0200 > > (pop-to-buffer (url-retrieve-synchronously "https://jigsaw.w3.org/HTTP/Basic/")) > > the user name/password is guest/guest. I'm prompted for that, and the > buffer I'm popped to is the "your browser made it" buffer, so it seems > to work for me? > > Does it work for you, too? Seems to work. I end up in a buffer named " *http jigsaw.w3.org:443*-264606" (the minus seems weird, perhaps an unrelated misfeature), whose contents is the entire response from the server, starting with HTTP/1.1 200 OK date: Tue, 24 Sep 2019 07:11:23 GMT content-length: 458 content-location: https://jigsaw.w3.org/HTTP/Basic/ok.html content-type: text/html etag: "1lkdfte:qoguo8q8" last-modified: Sun, 25 Jun 2000 17:08:58 GMT server: Jigsaw/2.3.0-beta3 and ending with this:


Your browser made it! Is this what you see? From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: David Engster Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2019 07:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed moreinfo To: Lars Ingebrigtsen Cc: Eli Zaretskii , Jerry Asher , 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.156930981318808 (code B ref 10478); Tue, 24 Sep 2019 07:24:01 +0000 Received: (at 10478) by debbugs.gnu.org; 24 Sep 2019 07:23:33 +0000 Received: from localhost ([127.0.0.1]:37531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCfAX-0004tB-65 for submit@debbugs.gnu.org; Tue, 24 Sep 2019 03:23:33 -0400 Received: from randomsample.de ([5.45.97.173]:52340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCfAS-0004sy-3O for 10478@debbugs.gnu.org; Tue, 24 Sep 2019 03:23:28 -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=9Qrm4OgWHI1AbH5RpTvRRpSh/iECmFHNe18B6l4B8HA=; b=jLpRxjxlJV09IYrPo0kNC+Ckx4jHbvaWxGlNGDJANqbU6+/AFg87Fsys7ToUxHqKf6OTmEHHPapU+r1cnOM7u7mGC5q52YGYszGA5PSecj9bglH/54vw131a1yYQ+n6A; Received: from ip4d1522dd.dynamic.kabel-deutschland.de ([77.21.34.221] helo=void) by randomsample.de with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1iCfAQ-00056b-OC; Tue, 24 Sep 2019 09:23:22 +0200 From: David Engster In-Reply-To: <87sgom2ng1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 24 Sep 2019 08:55:10 +0200") References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> <83k24tbabk.fsf@gnu.org> <874lvqgs3l.fsf@engster.org> <87sgom2ng1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Date: Tue, 24 Sep 2019 09:23:17 +0200 Message-ID: <875zli88ey.fsf@randomsample> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > I tried reproducing this bug again now, but I seem to be unable to. Has > somebody finally fixed it? > > Here's my test case: > > (pop-to-buffer (url-retrieve-synchronously "https://jigsaw.w3.org/HTTP/Basic/")) > > the user name/password is guest/guest. I'm prompted for that, and the > buffer I'm popped to is the "your browser made it" buffer, so it seems > to work for me? > > Does it work for you, too? Yes, works for me. -David From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2019 07:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed moreinfo To: Eli Zaretskii Cc: jerry.asher@gmail.com, deng@randomsample.de, 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.156931003719241 (code B ref 10478); Tue, 24 Sep 2019 07:28:01 +0000 Received: (at 10478) by debbugs.gnu.org; 24 Sep 2019 07:27:17 +0000 Received: from localhost ([127.0.0.1]:37535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCfE9-00050B-Da for submit@debbugs.gnu.org; Tue, 24 Sep 2019 03:27:17 -0400 Received: from quimby.gnus.org ([80.91.231.51]:57652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCfE4-0004zv-8U for 10478@debbugs.gnu.org; Tue, 24 Sep 2019 03:27:11 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCfE0-0002o4-3c; Tue, 24 Sep 2019 09:27:06 +0200 From: Lars Ingebrigtsen References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> <83k24tbabk.fsf@gnu.org> <874lvqgs3l.fsf@engster.org> <87sgom2ng1.fsf@gnus.org> <83zhiunp0x.fsf@gnu.org> Date: Tue, 24 Sep 2019 09:27:03 +0200 In-Reply-To: <83zhiunp0x.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Sep 2019 10:15:26 +0300") Message-ID: <87mueu2lyw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Seems to work. I end up in a buffer named " *http jigsaw.w3.org:443*-264606" > (the minus seems weird, perhaps an unrelated misfeature), url-http creates several buffers with `generate-new-buffer' (or the like), so if there's more than one connection done (as there is here), you'll get a '-' in the (final) buffer name. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Seems to work. I end up in a buffer named " *http jigsaw.w3.org:443*-264606" > (the minus seems weird, perhaps an unrelated misfeature), url-http creates several buffers with `generate-new-buffer' (or the like), so if there's more than one connection done (as there is here), you'll get a '-' in the (final) buffer name. > Is this what you see? Yup; thanks for testing. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Tue Jun 24 03:26:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2019 07:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed moreinfo To: David Engster Cc: Eli Zaretskii , Jerry Asher , 10478@debbugs.gnu.org Received: via spool by 10478-submit@debbugs.gnu.org id=B10478.156931005919286 (code B ref 10478); Tue, 24 Sep 2019 07:28:02 +0000 Received: (at 10478) by debbugs.gnu.org; 24 Sep 2019 07:27:39 +0000 Received: from localhost ([127.0.0.1]:37538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCfEZ-000510-4Z for submit@debbugs.gnu.org; Tue, 24 Sep 2019 03:27:39 -0400 Received: from quimby.gnus.org ([80.91.231.51]:57674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCfEX-00050q-Fx for 10478@debbugs.gnu.org; Tue, 24 Sep 2019 03:27:37 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCfES-0002oJ-Iq; Tue, 24 Sep 2019 09:27:36 +0200 From: Lars Ingebrigtsen References: <8737uqyzam.fsf@gnus.org> <87y3t9xsic.fsf@engster.org> <83k24tbabk.fsf@gnu.org> <874lvqgs3l.fsf@engster.org> <87sgom2ng1.fsf@gnus.org> <875zli88ey.fsf@randomsample> Date: Tue, 24 Sep 2019 09:27:32 +0200 In-Reply-To: <875zli88ey.fsf@randomsample> (David Engster's message of "Tue, 24 Sep 2019 09:23:17 +0200") Message-ID: <87impi2ly3.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: David Engster writes: > Lars Ingebrigtsen writes: >> I tried reproducing this bug again now, but I seem to be unable to. Has >> somebody finally fixed it? >> >> Here's my test case: >> >> (pop-to-buffer (url-retrieve-synch [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) David Engster writes: > Lars Ingebrigtsen writes: >> I tried reproducing this bug again now, but I seem to be unable to. Has >> somebody finally fixed it? >> >> Here's my test case: >> >> (pop-to-buffer (url-retrieve-synchronously >> "https://jigsaw.w3.org/HTTP/Basic/")) >> >> the user name/password is guest/guest. I'm prompted for that, and the >> buffer I'm popped to is the "your browser made it" buffer, so it seems >> to work for me? >> >> Does it work for you, too? > > Yes, works for me. Thanks for testing; I'm closing this bug report as it seems like somebody must have fixed it in the meantime. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 24 03:27:55 2019 Received: (at control) by debbugs.gnu.org; 24 Sep 2019 07:27:55 +0000 Received: from localhost ([127.0.0.1]:37541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCfEp-00051e-EP for submit@debbugs.gnu.org; Tue, 24 Sep 2019 03:27:55 -0400 Received: from quimby.gnus.org ([80.91.231.51]:57694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCfEn-00051U-Ri for control@debbugs.gnu.org; Tue, 24 Sep 2019 03:27:54 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCfEl-0002oZ-3o for control@debbugs.gnu.org; Tue, 24 Sep 2019 09:27:53 +0200 Date: Tue, 24 Sep 2019 09:27:50 +0200 Message-Id: <87h8522lxl.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #10478 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 10478 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 10478 quit