websrv_lib: flush at plain http, too
Since the write-buffering was enabled, it is now needed to flush. Fixes static http, at least. bzr revid: p_christ@hol.gr-20110118130005-tk5rz84po3q7qofu
This commit is contained in:
parent
6e2fee84f8
commit
e82fca056d
|
@ -396,6 +396,7 @@ class MultiHTTPHandler(FixSendError, HttpOptions, BaseHTTPRequestHandler):
|
|||
return
|
||||
if not self.parse_rawline():
|
||||
self.log_message("Could not parse rawline.")
|
||||
self.wfile.flush()
|
||||
return
|
||||
# self.parse_request(): # Do NOT parse here. the first line should be the only
|
||||
|
||||
|
@ -404,6 +405,7 @@ class MultiHTTPHandler(FixSendError, HttpOptions, BaseHTTPRequestHandler):
|
|||
if not self.parse_request():
|
||||
return
|
||||
self.do_OPTIONS()
|
||||
self.wfile.flush()
|
||||
return
|
||||
|
||||
for vdir in self.server.vdirs:
|
||||
|
@ -430,9 +432,11 @@ class MultiHTTPHandler(FixSendError, HttpOptions, BaseHTTPRequestHandler):
|
|||
"client closed connection", self.rlpath.rstrip())
|
||||
else:
|
||||
raise
|
||||
self.wfile.flush()
|
||||
return
|
||||
# if no match:
|
||||
self.send_error(404, "Path not found: %s" % self.path)
|
||||
self.wfile.flush()
|
||||
return
|
||||
|
||||
def _get_ignore_body(self,fore):
|
||||
|
@ -481,10 +485,6 @@ class SecureMultiHTTPHandler(MultiHTTPHandler):
|
|||
except Exception:
|
||||
pass
|
||||
|
||||
def handle_one_request(self):
|
||||
MultiHTTPHandler.handle_one_request(self)
|
||||
self.wfile.flush()
|
||||
|
||||
import threading
|
||||
class ConnThreadingMixIn:
|
||||
"""Mix-in class to handle each _connection_ in a new thread.
|
||||
|
|
Loading…
Reference in New Issue