changeset 2022:2fe25413867f maint-0.6

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Sun, 15 Feb 2004 22:22:20 +0000
parents 6a9e4e07c7d9
children e68b3c9a3b78
files CHANGES.txt roundup/scripts/roundup_server.py
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Fri Feb 13 01:35:02 2004 +0000
+++ b/CHANGES.txt	Sun Feb 15 22:22:20 2004 +0000
@@ -17,6 +17,7 @@
 - use supplied content-type on file uploads before trying filename)
 - fixed roundup-reminder script to use default schema (thanks Klamer Schutte)
 - fixed edit action / parsePropsFromForm to handle index-page edits better
+- safer logging from HTTP server (sf bug 896917)
 
 
 2003-12-17 0.6.4
--- a/roundup/scripts/roundup_server.py	Fri Feb 13 01:35:02 2004 +0000
+++ b/roundup/scripts/roundup_server.py	Sun Feb 15 22:22:20 2004 +0000
@@ -16,7 +16,7 @@
 # 
 """ HTTP Server that serves roundup.
 
-$Id: roundup_server.py,v 1.26.2.4 2003-12-04 22:53:54 richard Exp $
+$Id: roundup_server.py,v 1.26.2.5 2004-02-15 22:22:20 richard Exp $
 """
 
 # python version check
@@ -215,6 +215,16 @@
             host, port = self.client_address
             return socket.getfqdn(host)
 
+    def log_message(self, format, *args):
+        ''' Try to *safely* log to stderr.
+        '''
+        try:
+            BaseHTTPServer.BaseHTTPRequestHandler.log_message(self,
+                format, *args)
+        except IOError:
+            # stderr is no longer viable
+            pass
+
 try:
     import win32serviceutil
 except:

Roundup Issue Tracker: http://roundup-tracker.org/