Add requirements-dev.txt, right fix for fixes #5.

This commit is contained in:
Abhinav Singh 2018-12-22 11:08:54 -08:00
parent dd2e92f45e
commit 01010e30aa
3 changed files with 6 additions and 3 deletions

View File

@ -222,9 +222,9 @@ class HttpParser(object):
self.process_header(line)
# See `TestHttpParser.test_connect_request_without_host_header_request_parse` for details
if self.state == HttpParser.states.RCVING_HEADERS and \
if self.state == HttpParser.states.LINE_RCVD and \
self.method == b'CONNECT' and \
self.raw.endswith(CRLF * 2):
data == CRLF:
self.state = HttpParser.states.COMPLETE
if self.state == HttpParser.states.HEADERS_COMPLETE and \

3
requirements-dev.txt Normal file
View File

@ -0,0 +1,3 @@
coverage==4.5.2
pyflakes==2.0.0
twine==1.12.1

View File

@ -99,7 +99,7 @@ class TestHttpParser(unittest.TestCase):
def test_split(self):
self.assertEqual(HttpParser.split(b'CONNECT python.org:443 HTTP/1.0\r\n\r\n'),
(b'CONNECT python.org:443 HTTP/1.0', '\r\n'))
(b'CONNECT python.org:443 HTTP/1.0', b'\r\n'))
def test_split_false_line(self):
self.assertEqual(HttpParser.split(b'CONNECT python.org:443 HTTP/1.0'),