urllib to cache 301 redirections?

O.R.Senthil Kumaran orsenthil at users.sourceforge.net
Thu Jul 5 23:48:12 EDT 2007


Hi,
There is an Open Tracker item against urllib2 library python.org/sf/735515
which states that.
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. 

I am trying to understand, what does it mean.
Should the original url be avaiable to the user upon request as urllib
automatically calls the redirect_request and provides the redirected url only?

I am not completely getting what "cache - redirection" implies and what should
be done with the urllib2 module. Any pointers?

Thanks,
-- 
O.R.Senthil Kumaran
http://uthcode.sarovar.org



More information about the Python-list mailing list