diff options
Diffstat (limited to 'src/HTTPParser.py')
-rw-r--r-- | src/HTTPParser.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/HTTPParser.py b/src/HTTPParser.py index bbced43..7c64805 100644 --- a/src/HTTPParser.py +++ b/src/HTTPParser.py @@ -1,5 +1,5 @@ -from mimetools import Message -from StringIO import StringIO +import email +from io import StringIO class HTTPParser: def __init__(self): @@ -14,7 +14,7 @@ class HTTPParser: def parser(self,data): self.requestLine, self.headersAlone = data.split('\n', 1) - self.headers = Message(StringIO(self.headersAlone)) + self.headers = email.message_from_file(StringIO(self.headersAlone)) if 'host' in self.headers.keys(): self.host = self.headers['host'] |