chiark / gitweb /
document that nonce-based authentication is for the future
[hippotat.git] / hippotatd
index c03ae4892f0d32037607c10fecbdc721ca79fcc8..8fb0e0c7333163366050e2633ecff42e36be06ee 100755 (executable)
--- a/hippotatd
+++ b/hippotatd
@@ -126,7 +126,7 @@ class Client():
     nf = request.notifyFinish()
     nf.addErrback(self._req_error, request)
     nf.addCallback(self._req_fin, request, cl)
-    self._rq.append(request)
+    self._rq.append((request,nf))
     self._check_outbound()
 
   def _req_write(self, req, d):
@@ -136,9 +136,9 @@ class Client():
   def _check_outbound(self):
     log_debug(DBG.HTTP_CTRL, 'CHKO')
     while True:
-      try: request = self._rq[0]
+      try: (request,nf) = self._rq[0]
       except IndexError: request = None
-      if request and request.finished:
+      if request and nf.called:
         self._log(DBG.HTTP_CTRL, 'CHKO req finished, discard', idof=request)
         self._rq.popleft()
         continue
@@ -166,7 +166,7 @@ class Client():
       # round again, looking for more to do
 
     while len(self._rq) > self.cc.target_requests_outstanding:
-      request = self._rq.popleft()
+      (request, nf) = self._rq.popleft()
       self._log(DBG.HTTP, 'CHKO above target, returning empty', idof=request)
       request.finish()
 
@@ -218,7 +218,7 @@ 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)
+    else: return twisted.web.resource.Resource.getChild(self, name, request)
 
 class IphttpResource(NotStupidResource):
   def render_POST(self, request):
@@ -325,7 +325,7 @@ def process_cfg(_opts, putative_servers, putative_clients):
   except NoOptionError: pass
 
   cfg_process_ipif(c,
-                   [c.server, 'DEFAULT'],
+                   [c.server, 'COMMON'],
                    (('local','vaddr'),
                     ('peer', 'vrelay'),
                     ('rnets','vnetwork')))