projects
/
multitaskhttpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4efe39b
)
add HTTP Proxy Server (to 127.0.0.1 port 60001)
author
lkcl
<lkcl@teenymac.(none)>
Wed, 14 Jul 2010 00:03:37 +0000
(
01:03
+0100)
committer
lkcl
<lkcl@teenymac.(none)>
Wed, 14 Jul 2010 00:03:37 +0000
(
01:03
+0100)
proxyapp.py
[new file with mode: 0644]
patch
|
blob
diff --git a/proxyapp.py
b/proxyapp.py
new file mode 100644
(file)
index 0000000..
baf6027
--- /dev/null
+++ b/
proxyapp.py
@@ -0,0
+1,17
@@
+import multitask
+import httpd
+from ProxyServer import ProxyServerRequestHandler
+from httpd import HTTPServer, App, BaseApp
+
+class MyApp(ProxyServerRequestHandler, BaseApp):
+
+ def __init__(self):
+ BaseApp.__init__(self)
+ ProxyServerRequestHandler.__init__(self)
+
+httpd.set_debug(True)
+agent = HTTPServer()
+agent.apps = dict({'/test': MyApp, '*': MyApp})
+agent.start()
+multitask.run()
+