Senthil Kumaran <orsent...@gmail.com> added the comment: > Antoine Pitrou added the Comment: > > I have trouble understanding what the patch does. I would expect it to > cache the <original URL> -> <redirected URL> mapping, but it seems > cache the final HTTP response instead.
Oops. My mistake. I got carried away by my misunderstanding of the RFC section on 301. The patch is wrong. I coded it to cache the response from the redirection instead of just the redirected URL. I shall write the correct one to cache just the redirection. > Aren't http_error_301 and friends for internal use? Not really. They are exposed methods and I believe are being used by clients. There have been bug reports related those redirection methods. Even the related Issue735515, explains pretty clearly about the redirection required. (My bad again and my comment in that issue is irrelevant.) In this issue, John says that there is no obvious need to change the interface. RFC had a statement along the lines that "301 redirection is cached by default, unless indicated otherwise". This is where I thought, an option to turn-off the cacheable behavior might be needed. Thanks for looking at this quickly. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1755841> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com