Issue 735515: urllib / urllib2 should cache 301 redirections (original) (raw)

Created on 2003-05-10 00:21 by jjlee, last changed 2022-04-10 16:08 by admin. This issue is now closed.

Messages (5)
msg53878 - (view) Author: John J Lee (jjlee) Date: 2003-05-10 00:21
urllib / urllib2 should cache the results of 301 (permanent) redirections. This shouldn't break anything, since it's just an internal optimisation from one point of view -- but it's also what the RFC (2616, section 10.3.2, first para) says SHOULD happen.
msg53879 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2007-07-06 13:27
Hi gbrandll/jjlee, I am trying to understand the actual requirements here. Should the original url be avaiable to the user upon request as urllib automatically calls the redirect_request and provides the redirected url only? Please provide some details on this bug. I shall try to write a patch. Thanks, Senthil
msg61278 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-20 12:21
John, what did you have in mind?
msg61313 - (view) Author: John J Lee (jjlee) Date: 2008-01-20 17:32
In what respect? I just meant that it would be nice (and more compliant with the RFC) if rather than fetching the original URL each time, a map of URLs to 301-redirected URLs was kept. For urllib2, I suppose the map would be a private attribute of HTTPRedirectHandler. There's no obvious need to provide any interface to get the intermediate URLs in the redirection chain.
msg86706 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-27 22:41
Patch in issue 1755841.
History
Date User Action Args
2022-04-10 16:08:41 admin set github: 38478
2009-12-28 15:38:15 pitrou set status: open -> closedresolution: duplicatedependencies: - Patch for [ 735515 ] urllib2 should cache 301 redirsuperseder: Patch for [ 735515 ] urllib2 should cache 301 redir
2009-08-21 01:22:12 orsenthil set assignee: orsenthil
2009-04-27 22:41:38 ajaksu2 set versions: + Python 2.7nosy: + ajaksu2messages: + dependencies: + Patch for [ 735515 ] urllib2 should cache 301 redir
2008-01-20 17:32:42 jjlee set messages: +
2008-01-20 12:21:11 georg.brandl set nosy: + georg.brandlmessages: +
2008-01-05 13:07:33 vila set nosy: + vila
2003-05-10 00:21:26 jjlee create