Skip to content

Commit 1d92304

Browse files
committed
http proto bug
1 parent 1443352 commit 1d92304

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pproxy/__doc__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__title__ = "pproxy"
2-
__version__ = "2.2.3"
2+
__version__ = "2.2.4"
33
__license__ = "MIT"
44
__description__ = "Proxy server that can tunnel among remote servers by regex rules."
55
__keywords__ = "proxy socks http shadowsocks shadowsocksr ssr redirect pf tunnel cipher ssl udp"

pproxy/proto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ async def http_channel(self, reader, writer, stat_bytes, stat_conn):
271271
if b'\r\n\r\n' not in data:
272272
data += await reader.readuntil(b'\r\n\r\n')
273273
lines, data = data.split(b'\r\n\r\n', 1)
274-
headers = lines[:-4].decode().split('\r\n')
274+
headers = lines.decode().split('\r\n')
275275
method, path, ver = HTTP_LINE.match(headers.pop(0)).groups()
276276
lines = '\r\n'.join(i for i in headers if not i.startswith('Proxy-'))
277277
headers = dict(i.split(': ', 1) for i in headers if ': ' in i)

0 commit comments

Comments
 (0)