Skip to content

Commit

Permalink
Fixes lanjelot#107
Browse files Browse the repository at this point in the history
  • Loading branch information
lanjelot committed Nov 30, 2019
1 parent a92c06f commit e975529
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion patator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3524,8 +3524,12 @@ def __init__(self, fd):
self.rfile = fd
self.error = None
self.body = None
self.raw_requestline = self.rfile.readline()

command, path, version = B(self.rfile.readline()).split()
self.raw_requestline = b('%s %s %s' % (command, path, 'HTTP/1.1' if version.startswith('HTTP/2') else version))

self.parse_request()
self.request_version = version

if self.command == 'POST':
self.body = B(self.rfile.read(-1)).rstrip('\r\n')
Expand Down

0 comments on commit e975529

Please sign in to comment.