From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: URL not following some 302 redirects after recent changes Date: Sat, 20 Jan 2007 16:30:37 -0500 Message-ID: <87ps99s7wi.fsf@stupidchicken.com> References: <871wnw2opm.fsf@x3y2z1.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1169328685 25535 80.91.229.12 (20 Jan 2007 21:31:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 20 Jan 2007 21:31:25 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 20 22:31:23 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H8Nnz-0005ab-N0 for ged-emacs-devel@m.gmane.org; Sat, 20 Jan 2007 22:31:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8Nnz-0002xw-4d for ged-emacs-devel@m.gmane.org; Sat, 20 Jan 2007 16:31:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H8Nnm-0002tf-QL for emacs-devel@gnu.org; Sat, 20 Jan 2007 16:31:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H8Nnm-0002sW-Bv for emacs-devel@gnu.org; Sat, 20 Jan 2007 16:31:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8Nnm-0002sG-7n for emacs-devel@gnu.org; Sat, 20 Jan 2007 16:31:06 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H8Nnl-0007bP-Mh for emacs-devel@gnu.org; Sat, 20 Jan 2007 16:31:06 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H8NnZ-0006tZ-VK for emacs-devel@gnu.org; Sat, 20 Jan 2007 22:30:54 +0100 Original-Received: from cyd.mit.edu ([18.19.1.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Jan 2007 22:30:53 +0100 Original-Received: from cyd by cyd.mit.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Jan 2007 22:30:53 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 35 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cyd.mit.edu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) Cancel-Lock: sha1:rYbp2GzFKScYedFbCQQONWaaEzw= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:65332 Archived-At: Diane Murray writes: > Sometime after 2006-10-26 URL redirects stopped working correctly > (Emacs CVS of 2006-09-19 and 2006-10-26 works, 2006-10-31 and > 2006-11-19 don't work), perhaps due to changes made in revision 1.36 > of url-http.el. > > For example, returns the following > headers, but `url-retrieve' runs the callback function instead of > first retrieving the new location: > > HTTP/1.0 302 Redirected > Date: Fri, 17 Nov 2006 17:50:59 GMT > Server: Araneida/0.84 > Connection: close > Content-Type: text/html > Last-Modified: Fri, 17 Nov 2006 17:50:59 GMT > Location: http://www.cliki.net/CLiki > Pragma: no-cache > Expires: Fri, 30 Oct 1998 14:19:41 GMT > > The above-mentioned working versions retrieve the redirected URL > correctly. This seems to be the original intention. There is a comment in url-http.el: ;; 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. So it appears that it is up to the url client to resolve a 302 redirect manually.