chiark / gitweb /
want revert this somehow but the revert of it is buggy
[hippotat.git] / client
diff --git a/client b/client
index 856c6742b6827b00c362359e3fd0855361a152c5..829087e3936c8029e7f17d5f8e27fc56877848b1 100755 (executable)
--- a/client
+++ b/client
@@ -61,6 +61,7 @@ def outbound(packet, saddr, daddr):
 class ResponseConsumer(twisted.internet.protocol.Protocol):
   def __init__(self):
     self._ssd = SlipStreamDecoder(queue_inbound)
+
   def dataReceived(self, data):
     try: self._ssd.inputdata(mime_translate(data))
     except Exception as e: asyncfailure(e)
@@ -103,6 +104,8 @@ def check_outbound():
                   moredata,
                   c.max_batch_up)
     
+    d = mime_translate(d)
+
     crlf = b'\r\n'
     lf   =   b'\n'
     mime = (b'--b'                                        + crlf +
@@ -115,7 +118,7 @@ def check_outbound():
             b'--b'                                        + crlf +
             b'Content-Type: application/octet-stream'     + crlf +
             b'Content-Disposition: form-data; name="d"'   + crlf + crlf +
-            mime_translate(d)                             + crlf
+            d                                             + crlf
            ) if len(d) else b'')                               +
             b'--b--'                                      + crlf)