[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

Senthil Kumaran report at bugs.python.org
Tue Jan 5 17:57:52 CET 2010


Senthil Kumaran <orsenthil at gmail.com> added the comment:

Thanks for the comments.
Shall come with the tests. 

Yes,it currently does not handle chained redirects via cache. I dont know RFC's stance on it. RFC does not say anything about 301 chained redirects and there are tricker issues of caching anything other than 301. Basically, 302 and other require the client to check and comply with the Cache-Control and Expires header. The feature request was reasonably for caching only 301 redirs and I also feel a good one to have. This is the reason for the separate http_error_301 method.

The global opener seems to be a straight forward way to for this
activity and not a harmful too.  I can't think of request-specific
object for this one.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1755841>
_______________________________________


More information about the Python-bugs-list mailing list