mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
don't truncate, just create a new instance.
This commit is contained in:
parent
f9a17e467c
commit
c8d3b7764f
@ -132,7 +132,7 @@ class Request(Message):
|
||||
idx = buf.getvalue().find("\r\n")
|
||||
self.parse_request_line(buf.getvalue()[:idx])
|
||||
rest = buf.getvalue()[idx+2:] # Skip \r\n
|
||||
buf.truncate(0)
|
||||
buf = StringIO()
|
||||
buf.write(rest)
|
||||
|
||||
|
||||
@ -152,7 +152,7 @@ class Request(Message):
|
||||
self.headers = self.parse_headers(buf.getvalue()[:idx])
|
||||
|
||||
ret = buf.getvalue()[idx+4:]
|
||||
buf.truncate(0)
|
||||
buf = StringIO()
|
||||
return ret
|
||||
|
||||
def parse_request_line(self, line):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user