From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jerry Asher Newsgroups: gmane.emacs.bugs Subject: bug#10478: 24.0.50; url-http-parse-headers can silently drop the response when handling BASIC AUTHENTICATION Date: Wed, 11 Jan 2012 00:03:06 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1326269331 11088 80.91.229.12 (11 Jan 2012 08:08:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Jan 2012 08:08:51 +0000 (UTC) To: 10478@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 11 09:08:46 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RktEk-0001wT-Jj for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jan 2012 09:08:46 +0100 Original-Received: from localhost ([::1]:45749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RktEj-0002h6-SD for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jan 2012 03:08:45 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RksKW-0003Dp-Sj for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2012 02:10:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RksKU-0005hP-SH for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2012 02:10:40 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RksKU-0005hL-Q9 for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2012 02:10:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RksKr-0004BV-Uj for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2012 02:11:02 -0500 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132626585716071 (code B ref -1); Wed, 11 Jan 2012 07:11:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jan 2012 07:10:57 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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= Original-Received: by 10.50.184.166 with SMTP id ev6mr5692467igc.2.1326265409810; Tue, 10 Jan 2012 23:03:29 -0800 (PST) Original-Received: by 10.42.218.74 with HTTP; Tue, 10 Jan 2012 23:03:06 -0800 (PST) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Wed, 11 Jan 2012 03:08:43 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55631 Archived-At: 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)