[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: URL not following some 302 redirects after recent changes
From: |
Stefan Monnier |
Subject: |
Re: URL not following some 302 redirects after recent changes |
Date: |
Wed, 24 Jan 2007 11:05:11 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) |
>> 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, <http://www.cliki.net/cliki> 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"