aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-07-23 15:11:40 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-07-23 15:11:40 +1200
commit5283bb250788326ad1722b703148800a66a36adf (patch)
tree8f295eb98f69df0b96149347321448ff94c1ca16 /libpathod/pathod.py
parent1c45f5b05c7e066c28dfd4c9d1cde3b794f8983c (diff)
downloadmitmproxy-5283bb250788326ad1722b703148800a66a36adf.tar.gz
mitmproxy-5283bb250788326ad1722b703148800a66a36adf.tar.bz2
mitmproxy-5283bb250788326ad1722b703148800a66a36adf.zip
Refactor rparse.InternalResponse -> rparse.PathodErrorResponse
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r--libpathod/pathod.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py
index 0247c204..28484c5d 100644
--- a/libpathod/pathod.py
+++ b/libpathod/pathod.py
@@ -67,15 +67,12 @@ class PathodHandler(tcp.BaseHandler):
try:
crafted = rparse.parse_response(self.server.request_settings, spec)
except rparse.ParseException, v:
- crafted = rparse.InternalResponse(
- 800,
+ crafted = rparse.PathodErrorResponse(
+ "Parse Error",
"Error parsing response spec: %s\n"%v.msg + v.marked()
)
except rparse.FileAccessDenied:
- crafted = rparse.InternalResponse(
- 800,
- "Access Denied"
- )
+ crafted = rparse.PathodErrorResponse("Access Denied")
request_log = dict(
path = path,