# HG changeset patch # User Pierre-Yves David # Date 1339682103 -7200 # Node ID 86fc11fb6f99367784ba488271a88f0ce4ae7f0b # Parent 202625f247b4bb1a03c41b03bdfb545469bfd34f [web/application] declare default 'content' value sooner (closes #2406560) It may be used while processing AuthenticationError. Such error may be raised before the former declaration. diff -r 202625f247b4 -r 86fc11fb6f99 web/application.py --- a/web/application.py Wed Jun 13 10:06:11 2012 +0200 +++ b/web/application.py Thu Jun 14 15:55:03 2012 +0200 @@ -348,6 +348,7 @@ # activate realm-based auth realm = self.vreg.config['realm'] req.set_header('WWW-Authenticate', [('Basic', {'realm' : realm })], raw=False) + content = '' try: self.connect(req) # DENY https acces for anonymous_user @@ -356,7 +357,6 @@ and self.vreg.config['https-deny-anonymous']): # don't allow anonymous on https connection raise AuthenticationError() - content = '' # nested try to allow LogOut to delegate logic to AuthenticationError # handler try: