Skip to content

Commit

Permalink
Merge pull request qwj#125 from aladdinding/master
Browse files Browse the repository at this point in the history
proxy should return 200 Connection established instead 200 OK
  • Loading branch information
qwj committed Apr 22, 2021
2 parents 11d850e + 1d276a8 commit 4965c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pproxy/proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ async def http_accept(self, user, method, path, authority, ver, lines, host, pau
authtable.set_authed(user)
if method == 'CONNECT':
host_name, port = netloc_split(authority or path)
return user, host_name, port, lambda writer: reply(200, f'{ver} 200 OK\r\nConnection: close\r\n\r\n'.encode())
return user, host_name, port, lambda writer: reply(200, f'{ver} 200 Connection established\r\nConnection: close\r\n\r\n'.encode())
else:
host_name, port = netloc_split(url.netloc or host, default_port=80)
newpath = url._replace(netloc='', scheme='').geturl()
Expand Down

0 comments on commit 4965c8d

Please sign in to comment.