# HG changeset patch # User paulb # Date 1085864928 0 # Node ID ecc6825a869fa3c5f07f403094d2d30543dc1fc5 # Parent f41924452fe60a9bf2f0eba954464c92c3081830 [project @ 2004-05-29 21:08:48 by paulb] Fixed the content type for the login screen. Added decoding of encoded redirect URL information. diff -r f41924452fe6 -r ecc6825a869f examples/Common/Login/__init__.py --- a/examples/Common/Login/__init__.py Sat May 29 19:33:09 2004 +0000 +++ b/examples/Common/Login/__init__.py Sat May 29 21:08:48 2004 +0000 @@ -36,6 +36,7 @@ # When authentication fails or is yet to take place, show the login # screen. + trans.set_content_type(WebStack.Generic.ContentType("text/html")) out = trans.get_response_stream() out.write(""" @@ -54,6 +55,12 @@ """ % redirect) + def _decode(self, url): + + "Decode the given 'url' for redirection purposes." + + return url.replace("%3f", "?").replace("%26", "&") + class LoginAuthenticator: def __init__(self, secret_key, credentials, cookie_name=None):