aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/rparse.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-23 18:34:35 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-23 18:34:35 +1200
commite236d7746a3780c4d14e57e1c1e6661bb7a3ef21 (patch)
tree7f05d7759c0692021a99749687e8fea75463fdbb /libpathod/rparse.py
parentcb2f11a68e444d45e10e1b8045802bb94cfd70d6 (diff)
downloadmitmproxy-e236d7746a3780c4d14e57e1c1e6661bb7a3ef21.tar.gz
mitmproxy-e236d7746a3780c4d14e57e1c1e6661bb7a3ef21.tar.bz2
mitmproxy-e236d7746a3780c4d14e57e1c1e6661bb7a3ef21.zip
Move http.py to netlib.http_status
Diffstat (limited to 'libpathod/rparse.py')
-rw-r--r--libpathod/rparse.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpathod/rparse.py b/libpathod/rparse.py
index 47084520..92d0a54b 100644
--- a/libpathod/rparse.py
+++ b/libpathod/rparse.py
@@ -1,6 +1,6 @@
import operator, string, random, mmap, os, time
import contrib.pyparsing as pp
-import http
+from netlib import http_status
TESTING = False
@@ -315,7 +315,7 @@ class Code:
def __init__(self, code, msg=None):
self.code, self.msg = code, msg
if msg is None:
- self.msg = ValueLiteral(http.RESPONSES.get(self.code, "Unknown code"))
+ self.msg = ValueLiteral(http_status.RESPONSES.get(self.code, "Unknown code"))
def mod_response(self, settings, r):
r.code = self.code
@@ -342,7 +342,7 @@ class Response:
)
version = "HTTP/1.1"
code = 200
- msg = LiteralGenerator(http.RESPONSES[code])
+ msg = LiteralGenerator(http_status.RESPONSES[code])
body = LiteralGenerator("")
def __init__(self):
self.headers = []
@@ -481,7 +481,7 @@ class InternalResponse(Response):
def __init__(self, code, body):
Response.__init__(self)
self.code = code
- self.msg = LiteralGenerator(http.RESPONSES.get(code, "Unknown error"))
+ self.msg = LiteralGenerator(http_status.RESPONSES.get(code, "Unknown error"))
self.body = LiteralGenerator(body)
self.headers = [
(