From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: URL not following some 302 redirects after recent changes Date: Wed, 24 Jan 2007 11:05:11 -0500 Message-ID: References: <871wnw2opm.fsf@x3y2z1.net> <87ps99s7wi.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1169654743 10183 80.91.229.12 (24 Jan 2007 16:05:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Jan 2007 16:05:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 24 17:05:31 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 1H9kcp-0002Ou-57 for ged-emacs-devel@m.gmane.org; Wed, 24 Jan 2007 17:05:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9kco-0003uR-Ow for ged-emacs-devel@m.gmane.org; Wed, 24 Jan 2007 11:05:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9kcc-0003u8-Mv for emacs-devel@gnu.org; Wed, 24 Jan 2007 11:05:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9kcb-0003tn-Ag for emacs-devel@gnu.org; Wed, 24 Jan 2007 11:05:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9kcb-0003tk-5q for emacs-devel@gnu.org; Wed, 24 Jan 2007 11:05:13 -0500 Original-Received: from [209.226.175.34] (helo=tomts13-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H9kca-0007V8-F1 for emacs-devel@gnu.org; Wed, 24 Jan 2007 11:05:12 -0500 Original-Received: from pastel.home ([74.12.211.125]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070124160511.HPDG1773.tomts13-srv.bellnexxia.net@pastel.home> for ; Wed, 24 Jan 2007 11:05:11 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 452EE82DF; Wed, 24 Jan 2007 11:05:11 -0500 (EST) In-Reply-To: <87ps99s7wi.fsf@stupidchicken.com> (Chong Yidong's message of "Sat\, 20 Jan 2007 16\:30\:37 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) X-detected-kernel: Solaris 8 (1) 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:65446 Archived-At: >> 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. I'm not sure I understand: the comment only talks about requests other than GET or HEAD. From what I can tell the OP's request was a GET, so the comment shouldn't apply, right? Stefan "trying to understand what's going on so as to write something useful in the NEWS file"