[MERGE] HTTP redirection
aaron.bentley at utoronto.ca
Sun Mar 11 15:08:27 GMT 2007
Aaron Bentley has voted +1.
Status is now: Semi-approved
A few text cleanups wouldn't hurt:
+ """A support class providing redirections from one server to
+ 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
+ silently. The silent is relative: it is the caller responsability
+ inform the user about each redirection or only inform the user of a
+ via the exception parameter.
+ :param action: A callable, what the caller want to do while
+ :param transport: The initial transport used.
+ :param redirected: A callable receiving the redirected transport
+ RedirectRequested exception.
+ :param exception: The exception raised if too much redirections
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
For details, see:
More information about the bazaar