chiark / gitweb /
server: new SourceResource (skeleton)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 4 Apr 2017 16:15:28 +0000 (17:15 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 4 Apr 2017 16:15:28 +0000 (17:15 +0100)
hippotatd

index 32d9a34..3adf9b3 100755 (executable)
--- a/hippotatd
+++ b/hippotatd
@@ -202,8 +202,13 @@ class IphttpResource(NotStupidResource):
     log_debug(DBG.HTTP, 'GET request')
     return b'<html><body>hippotat</body></html>'
 
+class SourceResource(NotStupidResource):
+  def render_GET(self, request):
+    return b'<html><body>SUBDIR</body></html>'
+
 def start_http():
   resource = IphttpResource()
+  resource.putChild(b'source',SourceResource())
   site = twisted.web.server.Site(resource)
   for sa in c.saddrs:
     ep = sa.make_endpoint()