chiark
/
gitweb
/
~mdw
/
hippotat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2886148
)
server: new NotStupidResource
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 4 Apr 2017 16:15:07 +0000
(17:15 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 4 Apr 2017 16:15:07 +0000
(17:15 +0100)
hippotatd
patch
|
blob
|
blame
|
history
diff --git
a/hippotatd
b/hippotatd
index 1e9348e800d730bd183f9b7d512d16a08a8797bf..32d9a343763e6a41fb6baab2e773aeb211f18beb 100755
(executable)
--- a/
hippotatd
+++ b/
hippotatd
@@
-176,8
+176,13
@@
def log_http(desca, msg, **kwargs):
pass
log_debug(DBG.HTTP, msg + repr(desca), **kwargs)
pass
log_debug(DBG.HTTP, msg + repr(desca), **kwargs)
-class IphttpResource(twisted.web.resource.Resource):
- isLeaf = True
+class NotStupidResource(twisted.web.resource.Resource):
+ # why this is not the default is a mystery!
+ def getChild(self, name, request):
+ if name == b'': return self
+ else: return twisted.web.resource.Resource.getChild(name, request)
+
+class IphttpResource(NotStupidResource):
def render_POST(self, request):
log_debug(DBG.HTTP_FULL,
'req recv: ' + repr(request) + ' ' + repr(request.args),
def render_POST(self, request):
log_debug(DBG.HTTP_FULL,
'req recv: ' + repr(request) + ' ' + repr(request.args),