##// END OF EJS Templates
server: skip logging of ECONNRESET...
Augie Fackler -
r42005:6bbb12cb default
parent child Browse files
Show More
@@ -100,9 +100,11 class _httprequesthandler(httpservermod.
100 def do_POST(self):
100 def do_POST(self):
101 try:
101 try:
102 self.do_write()
102 self.do_write()
103 except Exception:
103 except Exception as e:
104 # I/O below could raise another exception. So log the original
104 # I/O below could raise another exception. So log the original
105 # exception first to ensure it is recorded.
105 # exception first to ensure it is recorded.
106 if not (isinstance(e, (OSError, socket.error))
107 and e.errno == errno.ECONNRESET):
106 tb = r"".join(traceback.format_exception(*sys.exc_info()))
108 tb = r"".join(traceback.format_exception(*sys.exc_info()))
107 # We need a native-string newline to poke in the log
109 # We need a native-string newline to poke in the log
108 # message, because we won't get a newline when using an
110 # message, because we won't get a newline when using an
@@ -911,18 +911,6 Test signal-safe-lock in web and non-web
911 errors
911 errors
912
912
913 $ cat errors.log | "$PYTHON" $TESTDIR/filtertraceback.py
913 $ cat errors.log | "$PYTHON" $TESTDIR/filtertraceback.py
914 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=spam': (glob)
915 Traceback (most recent call last):
916 error: [Errno 104] $ECONNRESET$
917
918 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/spam': (glob)
919 Traceback (most recent call last):
920 error: [Errno 104] $ECONNRESET$
921
922 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/spam/tip/foo': (glob)
923 Traceback (most recent call last):
924 error: [Errno 104] $ECONNRESET$
925
926 $ rm -f errors.log
914 $ rm -f errors.log
927
915
928 Uncaught exceptions result in a logged error and canned HTTP response
916 Uncaught exceptions result in a logged error and canned HTTP response
General Comments 0
You need to be logged in to leave comments. Login now