websrv_lib: defer one socket.flush(), keep packets minimum.
bzr revid: p_christ@hol.gr-20110118125907-t7dz40a40pj6k8gs
This commit is contained in:
parent
06b0cdbfaa
commit
5168d0bd09
|
@ -182,12 +182,13 @@ class FixSendError:
|
|||
self.send_header('Connection', 'close')
|
||||
self.send_header('Content-Length', len(content) or 0)
|
||||
self.end_headers()
|
||||
if hasattr(self, '_flush'):
|
||||
self._flush()
|
||||
|
||||
if self.command != 'HEAD' and code >= 200 and code not in (204, 304):
|
||||
self.wfile.write(content)
|
||||
|
||||
if hasattr(self, '_flush'):
|
||||
self._flush()
|
||||
|
||||
class HttpOptions:
|
||||
_HTTP_OPTIONS = {'Allow': ['OPTIONS' ] }
|
||||
|
||||
|
|
Loading…
Reference in New Issue