aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-04-30 10:09:16 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-04-30 10:09:16 +1200
commitd171e13fd376225695b45a02925952fe7c0aeefc (patch)
tree5507caf243ca6458efb322b45ccffc6ee43de462
parent3365acf69fcc269c52dac405f674cc094faeb64c (diff)
downloadmitmproxy-d171e13fd376225695b45a02925952fe7c0aeefc.tar.gz
mitmproxy-d171e13fd376225695b45a02925952fe7c0aeefc.tar.bz2
mitmproxy-d171e13fd376225695b45a02925952fe7c0aeefc.zip
Fix redundant imports, tweak TODO for 0.2
-rw-r--r--README.mkd4
-rw-r--r--libpathod/rparse.py4
-rw-r--r--libpathod/utils.py2
-rw-r--r--test/test_rparse.py2
-rw-r--r--todo5
5 files changed, 10 insertions, 7 deletions
diff --git a/README.mkd b/README.mkd
index bf5634ba..43c447fe 100644
--- a/README.mkd
+++ b/README.mkd
@@ -233,12 +233,14 @@ Supported data types are:
ascii
bytes
+
# API
__pathod__ exposes a simple API, intended to make it possible to drive and
inspect the daemon remotely for use in unit testing and the like. The next
release will include a client-side library that makes this transparent.
+
### /api/log
Returns the current log buffer. At the moment the buffer size is 500 entries -
@@ -287,6 +289,7 @@ Where each entry looks like this:
You can preview the JSON data returned for a log entry through the built-in web
interface.
+
### /api/log/clear
A POST to this URL clears the log buffer.
@@ -302,4 +305,3 @@ system, installing __pathod__ and its dependencies is dead simple:
The project uses the __pry__ unit testing framework, which you can get here:
http://github.com/cortesi/pry
-
diff --git a/libpathod/rparse.py b/libpathod/rparse.py
index d3b3dbb5..87eff563 100644
--- a/libpathod/rparse.py
+++ b/libpathod/rparse.py
@@ -1,6 +1,6 @@
-import operator, string, random, sys, time, mmap, os, time
+import operator, string, random, mmap, os, time
import contrib.pyparsing as pp
-import http, utils
+import http
import tornado.ioloop
TESTING = False
diff --git a/libpathod/utils.py b/libpathod/utils.py
index 6d42c9b2..46b252dd 100644
--- a/libpathod/utils.py
+++ b/libpathod/utils.py
@@ -1,4 +1,4 @@
-import copy, os, re, StringIO
+import os, re
import rparse
class AnchorError(Exception): pass
diff --git a/test/test_rparse.py b/test/test_rparse.py
index 621cf8a3..a2a83c61 100644
--- a/test/test_rparse.py
+++ b/test/test_rparse.py
@@ -1,4 +1,4 @@
-import sys, os
+import os
import libpry
from libpathod import rparse, utils
diff --git a/todo b/todo
index fe9c2db3..98e4790c 100644
--- a/todo
+++ b/todo
@@ -1,10 +1,11 @@
0.2:
- API
- - Logs, log reset, log retrieval
- Anchor management
+ - Client library
+ - Unit testing examples
- Specify if server should add Server and Date headers
- Shortcuts for cookies, auth
- Various SSL errors (expired certs, etc.)
- - Caching functions
+ - Muck with caching