mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
I don't see any good reason to keep Status here. Also since we are
HTTP/1.1 make sure to use correct status line
This commit is contained in:
parent
d26073cc78
commit
c67800e1c7
@ -19,12 +19,10 @@ class Response(object):
|
|||||||
def send(self):
|
def send(self):
|
||||||
# send headers
|
# send headers
|
||||||
resp_head = []
|
resp_head = []
|
||||||
resp_head.append("HTTP/1.0 %s\r\n" % (self.status))
|
resp_head.append("HTTP/1.1 %s\r\n" % (self.status))
|
||||||
|
|
||||||
resp_head.append("Server: %s\r\n" % self.SERVER_VERSION)
|
resp_head.append("Server: %s\r\n" % self.SERVER_VERSION)
|
||||||
resp_head.append("Date: %s\r\n" % http_date())
|
resp_head.append("Date: %s\r\n" % http_date())
|
||||||
# broken clients
|
|
||||||
resp_head.append("Status: %s\r\n" % str(self.status))
|
|
||||||
# always close the connection
|
# always close the connection
|
||||||
resp_head.append("Connection: close\r\n")
|
resp_head.append("Connection: close\r\n")
|
||||||
for name, value in self.headers:
|
for name, value in self.headers:
|
||||||
|
|||||||
@ -134,7 +134,7 @@ def write_error(sock, msg):
|
|||||||
</html>
|
</html>
|
||||||
""") % msg
|
""") % msg
|
||||||
http = textwrap.dedent("""\
|
http = textwrap.dedent("""\
|
||||||
HTTP/1.0 500 Internal Server Error\r
|
HTTP/1.1 500 Internal Server Error\r
|
||||||
Connection: close\r
|
Connection: close\r
|
||||||
Content-Type: text/html\r
|
Content-Type: text/html\r
|
||||||
Content-Length: %d\r
|
Content-Length: %d\r
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user