web/application.py
changeset 8560 fef0b8214fcf
parent 8556 bbe0d6985e59
child 8594 001159e2e4f3
--- a/web/application.py	Mon Sep 10 16:24:32 2012 +0200
+++ b/web/application.py	Mon Sep 10 16:25:48 2012 +0200
@@ -461,7 +461,6 @@
             result = self.notfound_content(req)
             req.status_out = ex.status
         except ValidationError, ex:
-            req.status_out = httplib.CONFLICT
             result = self.validation_error_handler(req, ex)
         except RemoteCallFailed, ex:
             result = self.ajax_error_handler(req, ex)
@@ -480,7 +479,7 @@
         except (AuthenticationError, LogOut):
             # the rollback is handled in the finally
             raise
-        ### Last defence line
+        ### Last defense line
         except BaseException, ex:
             result = self.error_handler(req, ex, tb=True)
         finally:
@@ -526,6 +525,7 @@
             req.headers_out.setHeader('location', str(location))
             req.status_out = httplib.SEE_OTHER
             return ''
+        req.status_out = httplib.CONFLICT
         return self.error_handler(req, ex, tb=False)
 
     def error_handler(self, req, ex, tb=False):