chiark / gitweb /
server: new NotStupidResource
[hippotat.git] / 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)
 
-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),