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)
moredata,
c.max_batch_up)
+ d = mime_translate(d)
+
crlf = b'\r\n'
lf = b'\n'
mime = (b'--b' + crlf +
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)