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

Antoine Pitrou report at bugs.python.org
Sun Jan 3 13:45:47 CET 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

> Here is the corrected patch for caching the 301 redirections.
> 
> * It caches only the redirection not the response.
> * It retains cacheable=True kwarg for http_error_301 method. ( I feel, it should be useful)
> * Have made the cached dict as private.

I'm still not sure what this patch is trying to do. It seems you are using the cached URL *after* getting the 301 response. But the whole point of caching redirections is to avoid emitting the initial request at all.

----------

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


More information about the Python-bugs-list mailing list