Skip to content

Commit 1a7e67b

Browse files
committed
only create WSGI environ on demand.
1 parent 09f7e7e commit 1a7e67b

File tree

3 files changed

+802
-744
lines changed

3 files changed

+802
-744
lines changed

examples/httpparser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def main():
1616
try:
1717
s.connect(('gunicorn.org', 80))
1818
s.send(b("GET / HTTP/1.1\r\nHost: gunicorn.org\r\n\r\n"))
19-
19+
2020
while True:
2121
data = s.recv(1024)
2222
if not data:
@@ -37,8 +37,9 @@ def main():
3737
if p.is_message_complete():
3838
break
3939

40+
4041
print(b("").join(body))
41-
42+
4243
finally:
4344
s.close()
4445

0 commit comments

Comments
 (0)