[albatross-users] Albatross development preview 1.2-dev-20040114

Andrew McNamara andrewm at object-craft.com.au
Thu Jan 15 13:33:02 EST 2004


>The status update isn't working correctly on mod_python (I have tried
>other request interfaces).

You've tried *every* other request interface? Or did you mean you haven't
tried any other request interfaces?

>On an error it's returning a double set of 200 OK pages.  If
>traceback.html is present, it is displayed first, then a second set of
>headers and the apache generated OK page.  If there is no traceback.html,
>traceback is displayed, again followed by a second set of headers and the
>apache OK page.  In both cases the status of the page is 200, and an error
>log entry for a 500 requesst is not entered.

Albatross never before attempted to set any status other than 200 - the
changes are tickling behaviour that hasn't been used before. It turns
out that, with mod_python, if you want to generate your own error page,
you need to return apache.OK, and set the mod_python req.status attribute.

Because there are deployed apps out there, I'm thinking of making
Application.run() return 0 unconditionally, and applying a patch like
this to apacheapp.py:

--- apacheapp.py        9 Jan 2004 12:38:27 -0000       1.25
+++ apacheapp.py        15 Jan 2004 02:31:44 -0000
@@ -48,10 +48,8 @@
         self.__req.write(data)
 
     def set_status(self, status):
+        self.__req.status = status
         self.__status = status
 
     def status(self):
-        if self.__status == HTTP_OK:
-            return apache.OK
-        else:
-            return self.__status
+        return self.__status

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/




More information about the Albatross-users mailing list