mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix issue #7. thanks!
This commit is contained in:
parent
498809d39e
commit
6c405b9d14
@ -93,7 +93,7 @@ def writelines(sock, lines):
|
|||||||
for line in list(lines):
|
for line in list(lines):
|
||||||
write(sock, line)
|
write(sock, line)
|
||||||
|
|
||||||
def write_error(sock, mesg):
|
def write_error(sock, msg):
|
||||||
html = textwrap.dedent("""\
|
html = textwrap.dedent("""\
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@ -105,7 +105,7 @@ def write_error(sock, mesg):
|
|||||||
<pre>%s</pre>
|
<pre>%s</pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
""") % mesg
|
""") % msg
|
||||||
http = textwrap.dedent("""\
|
http = textwrap.dedent("""\
|
||||||
HTTP/1.0 500 Internal Server Error\r
|
HTTP/1.0 500 Internal Server Error\r
|
||||||
Connection: close\r
|
Connection: close\r
|
||||||
@ -113,7 +113,7 @@ def write_error(sock, mesg):
|
|||||||
Content-Length: %d\r
|
Content-Length: %d\r
|
||||||
\r
|
\r
|
||||||
%s
|
%s
|
||||||
""") % (len(http), http)
|
""") % (len(html), html)
|
||||||
write_nonblock(sock, http)
|
write_nonblock(sock, http)
|
||||||
|
|
||||||
def normalize_name(name):
|
def normalize_name(name):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user