From 297b3ebf9498b0954fc77728b8d92064e9ee6684 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 1 Apr 2017 12:40:59 +0100 Subject: [PATCH] fixes --- client | 4 ++-- hippotat/__init__.py | 1 + server | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client b/client index 931cb1f..ce5e856 100755 --- a/client +++ b/client @@ -48,7 +48,7 @@ outstanding = 0 def start_client(): global queue global agent - queue = PacketQueue(c.max_queue_time) + queue = PacketQueue('up', c.max_queue_time) agent = twisted.web.client.Agent(reactor, connectTimeout = c.http_timeout) def outbound(packet, saddr, daddr): @@ -112,7 +112,7 @@ def check_outbound(): mime_translate(d) + crlf + b'--b--' + crlf) - print('REQUESTING ', mime, file=sys.stderr) + log_debug(DBG.HTTP_FULL, 'requesting: ' + str(mime)) hh = { 'User-Agent': ['hippotat'], 'Content-Type': ['multipart/form-data; boundary="b"'] } diff --git a/hippotat/__init__.py b/hippotat/__init__.py index 0649091..22c92dc 100644 --- a/hippotat/__init__.py +++ b/hippotat/__init__.py @@ -37,6 +37,7 @@ class DBG(twisted.python.constants.Names): INIT = NamedConstant() QUEUE = NamedConstant() QUEUE_CTRL = NamedConstant() + HTTP_FULL = NamedConstant() _hex_codec = codecs.getencoder('hex_codec') diff --git a/server b/server index 19a04d2..029d064 100755 --- a/server +++ b/server @@ -168,6 +168,9 @@ def log_http(desca, msg): class IphttpResource(twisted.web.resource.Resource): isLeaf = True def render_POST(self, request): + log_debug(DBG.HTTP_FULL, + 'req recv: ' + repr(request) + ' ' + repr(request.args), + idof=id(request)) desca = {'d': None} try: process_request(request, desca) except Exception as e: -- 2.30.2