From 3d3f820a7d57dd88db484efee7665b826dfa6d75 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sat, 22 Feb 2014 20:38:33 -0500 Subject: [PATCH] Correct two protocol violations of TLV One was the client going away without contemplating the done flag. Another was the server sending two requestdone messages. --- bin/confetty | 1 - confluent/sockapi.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/confetty b/bin/confetty index e6c8c88e..fbbaf7df 100755 --- a/bin/confetty +++ b/bin/confetty @@ -257,7 +257,6 @@ def setvalues(attribs): if 'errorcode' in res: exitcode = res['errorcode'] sys.stderr.write('Error: ' + res['error'] + '\n') - return diff --git a/confluent/sockapi.py b/confluent/sockapi.py index 8556d566..0a2e5f9b 100644 --- a/confluent/sockapi.py +++ b/confluent/sockapi.py @@ -123,8 +123,7 @@ def process_request(connection, request, cfm, authdata): tlvdata.send_tlvdata(connection, {"_requestdone": 1}) except exc.InvalidArgumentException: tlvdata.send_tlvdata(connection, {"errorcode": 400, - "error": "Bad Request", - "_requestdone": 1}) + "error": "Bad Request"}) tlvdata.send_tlvdata(connection, {"_requestdone": 1}) send_response(hdlr, connection) return