aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libpathod/language.py18
-rw-r--r--libpathod/pathoc.py7
-rw-r--r--test/test_pathoc.py6
3 files changed, 3 insertions, 28 deletions
diff --git a/libpathod/language.py b/libpathod/language.py
index 53878b97..960e9d17 100644
--- a/libpathod/language.py
+++ b/libpathod/language.py
@@ -25,18 +25,6 @@ class ParseException(Exception):
return "%s at char %s"%(self.msg, self.col)
-def actions_log(lst):
- ret = []
- for i in lst:
- if i[1] == "inject":
- ret.append(
- [i[0], i[1], repr(i[2])]
- )
- else:
- ret.append(i)
- return ret
-
-
def ready_actions(length, lst):
ret = []
for i in lst:
@@ -620,7 +608,6 @@ class Message:
err.serve(fp)
return dict(
disconnect = True,
- actions = actions_log(actions),
error = ret
)
disconnect = write_values(fp, vals, actions[:])
@@ -629,7 +616,6 @@ class Message:
disconnect = disconnect,
started = started,
duration = duration,
- actions = actions_log(actions),
)
for i in self.logattrs:
v = getattr(self, i)
@@ -656,8 +642,8 @@ class Response(Message):
logattrs = ["code", "version", "body"]
def __init__(self):
Message.__init__(self)
- self.code = 200
- self.msg = LiteralGenerator(http_status.RESPONSES[self.code])
+ self.code = None
+ self.msg = None
def preamble(self):
return [self.version, " ", str(self.code), " ", self.msg]
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py
index bab568ca..3ed09190 100644
--- a/libpathod/pathoc.py
+++ b/libpathod/pathoc.py
@@ -83,13 +83,6 @@ class Pathoc(tcp.TCPClient):
if req:
if ignorecodes and resp and resp[1] in ignorecodes:
return
- if explain:
- print >> fp, ">>", req["method"], repr(req["path"])
- for a in req["actions"]:
- print >> fp, "\t",
- for x in a:
- print >> fp, x,
- print >> fp
if showreq:
self._show(fp, ">> Request", self.wfile.get_log(), hexdump)
diff --git a/test/test_pathoc.py b/test/test_pathoc.py
index 1c64f076..bec339cb 100644
--- a/test/test_pathoc.py
+++ b/test/test_pathoc.py
@@ -75,12 +75,8 @@ class TestDaemon:
def test_conn_err(self):
assert "Invalid server response" in self.tval(["get:'/p/200:d2'"])
- def test_explain(self):
- reqs = [ "get:/api/info:ir,'x'"]
- assert "inject" in self.tval(reqs, explain=True)
-
def test_fileread(self):
d = tutils.test_data.path("data/request")
- assert "foo" in self.tval(["+%s"%d], explain=True)
+ assert "foo" in self.tval(["+%s"%d], showreq=True)
assert "File" in self.tval(["+/nonexistent"])