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):
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"'] }
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: