Skip to content

Commit

Permalink
[server] split on LF, not CRLF
Browse files Browse the repository at this point in the history
This avoids a possible problem where CR is not present. If present it will be striped.
  • Loading branch information
Huevos committed Dec 11, 2021
1 parent 10b0a41 commit 10080bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def __init__(self, *args, **kwargs):
class RootedHTTPRequestHandler(RootedBaseHTTPRequestHandler):
def do_GET(self):
try:
for x in str(self.headers).split('\r\n'):
for x in str(self.headers).split('\n'):
x = x.strip()
if x.startswith('Host:'):
host = x
break
Expand Down

0 comments on commit 10080bc

Please sign in to comment.