From: Ian Jackson Date: Sat, 1 Apr 2017 21:35:08 +0000 (+0100) Subject: wip, progress! X-Git-Tag: hippotat/1.0.0~55^2~156 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=hippotat.git;a=commitdiff_plain;h=6f387df3234541f1066eff163d18fa6becf59c82 wip, progress! --- diff --git a/hippotat/slip.py b/hippotat/slip.py index e339f69..f135137 100644 --- a/hippotat/slip.py +++ b/hippotat/slip.py @@ -12,7 +12,7 @@ def encode(packet): .replace(end, esc + esc_end)) def decode(data): - print('DECODE ', repr(data)) + #print('DECODE ', repr(data)) out = [] for packet in data.split(end): pdata = b'' diff --git a/server b/server index 3bfbc42..e5aa67b 100755 --- a/server +++ b/server @@ -165,6 +165,8 @@ def process_request(request, desca): log_http(desca, 'processing', idof=id(request), d=d) + d = mime_translate(d) + cl.process_arriving_data(d) cl.new_request(request) @@ -186,7 +188,7 @@ class IphttpResource(twisted.web.resource.Resource): try: process_request(request, desca) except Exception as e: emsg = traceback.format_exc() - log_http(desca, 'EXCEPTION ' + emsg) + log_http(desca, 'RETURNING EXCEPTION ' + emsg) request.setHeader('Content-Type','text/plain; charset="utf-8"') request.setResponseCode(400) return (emsg + ' # ' + repr(desca) + '\r\n').encode('utf-8') @@ -230,6 +232,6 @@ def process_cfg(): common_startup() process_cfg() -start_ipif(c.ipif_command, route) +start_ipif(c.ipif_command, (lambda p,s,d: route(p,"[ipif]",s,d))) start_http() common_run()