]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_p2p/HTTPServer.py
Display DHT statistics to the HTTP user.
[quix0rs-apt-p2p.git] / apt_p2p / HTTPServer.py
index d252a6386aef205ed397e83579559eb2a33139db..03eea9942863bf7f3dd971341b12cb66019fd44c 100644 (file)
@@ -137,8 +137,7 @@ class TopLevel(resource.Resource):
     @type manager: L{apt_p2p.AptP2P}
     @ivar manager: the main program object to send requests to
     @type factory: L{twisted.web2.channel.HTTPFactory} or L{policies.ThrottlingFactory}
-    @ivar factory: the factory to use to server HTTP requests
-    
+    @ivar factory: the factory to use to serve HTTP requests
     """
     
     addSlash = True
@@ -172,9 +171,7 @@ class TopLevel(resource.Resource):
         return http.Response(
             200,
             {'content-type': http_headers.MimeType('text', 'html')},
-            """<html><body>
-            <h2>Statistics</h2>
-            <p>TODO: eventually some stats will be shown here.</body></html>""")
+            self.manager.getStats())
 
     def locateChild(self, request, segments):
         """Process the incoming request."""