[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: |
T. V. Raman |
Subject: |
Re: URL not following some 302 redirects after recent changes |
Date: |
Sun, 11 Feb 2007 17:37:12 -0800 |
It would still be nice to have a custom option that tells url to
repeatedly follow redirects -- a la curl's --location and
--location-trusted flags.
>>>>> "Chong" == Chong Yidong <address@hidden> writes:
Chong> Diane Murray <address@hidden> 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, <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.
Chong>
Chong> This seems to be the original intention. There is a
Chong> comment in url-http.el:
Chong>
Chong> ;; If the 301|302 status code is received in
Chong> response to a ;; request other than GET or HEAD, the
Chong> user agent MUST NOT ;; automatically redirect the
Chong> request unless it can be ;; confirmed by the user,
Chong> since this might change the ;; conditions under which
Chong> the request was issued.
Chong>
Chong> So it appears that it is up to the url client to
Chong> resolve a 302 redirect manually.
Chong>
Chong>
Chong>
Chong> _______________________________________________
Chong> Emacs-devel mailing list address@hidden
Chong> http://lists.gnu.org/mailman/listinfo/emacs-devel
--
Best Regards,
--raman
Email: address@hidden
WWW: http://emacspeak.sf.net/raman/
AIM: emacspeak GTalk: address@hidden
PGP: http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman
IRC: irc://irc.freenode.net/#emacs
Re: URL not following some 302 redirects after recent changes,
T. V. Raman <=