[MERGE] HTTP redirection
Aaron Bentley
aaron.bentley at utoronto.ca
Sun Mar 11 15:08:27 GMT 2007
Aaron Bentley has voted +1.
Status is now: Semi-approved
Comment:
A few text cleanups wouldn't hurt:
+class TestCaseWithRedirectedWebserver(TestCaseWithTwoWebservers):
+ """A support class providing redirections from one server to
another.
+
+ We setup two webservers to allows various tests involving
Should be "set up".
+def do_catching_redirections(action, transport, redirected):
+ """Execute an action with given transport catching redirections.
+
+ This is a facility provided for callers needing to follow
redirections
+ silently. The silent is relative: it is the caller responsability
to
+ inform the user about each redirection or only inform the user of a
user
+ via the exception parameter.
+
+ :param action: A callable, what the caller want to do while
catching
+ redirections.
+ :param transport: The initial transport used.
+ :param redirected: A callable receiving the redirected transport
and the
+ RedirectRequested exception.
+ :param exception: The exception raised if too much redirections
occur.
Should say: The "silent" is relative: it is the caller's responsibility
It could also be changed to: The silence is relative...
Also, the documentation of the exception parameter should be removed.
+ # Loop exited without resolving redirect ? Either the
+ # user has kept a very very very old reference or a loop
+ # occured in the redirections. Nothing we can cure here:
+ # tell the user. Note that as the user has been informed
+ # about each redirection (it is the caller responsibility
+ # to do that in redirected via the provided
+ # redirection_notice). The caller may provide more
+ # informations if needed (like what file or directory we
+ # were trying to act upon when the redirection loop
+ # occured).
Should say "information", not "informations" and "occurred", not
"occured".
For details, see:
http://bundlebuggy.aaronbentley.com/request/%3Cm2y7mgab59.fsf%40free.fr%3E
More information about the bazaar
mailing list