48
48
self.send_response(0, "Bad status")
50
50
except socket.error, e:
51
if (len(e.args) > 0) and (e.args[0] == errno.EPIPE):
52
# We don't want to pollute the test reuslts with
53
# spurious server errors while test succeed. In
54
# our case, it may occur that the test have
55
# already read the 'Bad Status' and closed the
56
# socket while we are still trying to send some
57
# headers... So the test is ok but if we raise
58
# the exception the output is dirty. So we don't
59
# raise, but we close the connection, just to be
51
# We don't want to pollute the test results with
52
# spurious server errors while test succeed. In our
53
# case, it may occur that the test has already read
54
# the 'Bad Status' and closed the socket while we are
55
# still trying to send some headers... So the test is
56
# ok, but if we raise the exception, the output is
57
# dirty. So we don't raise, but we close the
58
# connection, just to be safe :)
59
spurious = [errno.EPIPE,
63
if (len(e.args) > 0) and (e.args[0] in spurious):
61
64
self.close_connection = 1