mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix keepalive response.
The expected response for keeep alive connections are Connection: keep-alive not keepalive.
This commit is contained in:
parent
1319543448
commit
a3a655928d
@ -222,7 +222,7 @@ class Response(object):
|
||||
elif self.should_close():
|
||||
connection = "close"
|
||||
else:
|
||||
connection = "keepalive"
|
||||
connection = "keep-alive"
|
||||
|
||||
headers = [
|
||||
"HTTP/%s.%s %s\r\n" % (self.req.version[0],
|
||||
@ -240,6 +240,7 @@ class Response(object):
|
||||
return
|
||||
tosend = self.default_headers()
|
||||
tosend.extend(["%s: %s\r\n" % (n, v) for n, v in self.headers])
|
||||
print tosend
|
||||
util.write(self.sock, "%s\r\n" % "".join(tosend))
|
||||
self.headers_sent = True
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user