-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding/decoding binary stream breaks application #818
Comments
@bitprophet Do you have any ideas on how to solve this? This is a critical severity issue to me, as it is simply impossible to run the application successfully without patching this library. I assume the above diff is not going to be accepted as a PR, but I really don't understand why it is encoding stuff. It is receiving arbitrary data it knows nothing about and then assuming it can decode it with the system's default locale, which just seems crazy to me. It's also set to 'replace' which means half the bytes are just removed from the original value, so it just produces garbage. Maybe an option to avoid encoding/decoding if encoding is set to |
|
I can see the code is still there. But, can test it out later to double check.
I didn't see any at the time, but another look suggests maybe #354 refers to the same problem.
I'm not sure how we'd do it automatically, a try/except could pass on one chunk of data and then fail on the next. I'm also not clear on what use cases are being solved by the encoding, but when using fabric it's clear to me that I'm just sending data through a pipe, so even if it was valid utf-8 there would be no point in decoding it just to encode it again. So, an explicit setting would be fine. |
Yes, though we'd need to check to make sure that |
I'm trying to stream data with fabric to another server through an SSH connection. The data is just binary data and should have no meaning or anything applied to it within the application. But, when sending this via fabric, invoke will try to encode it as a str and then decode it again as bytes, which breaks everything and results in the socket closing.
My application runs fine after removing those steps from invoke:
The text was updated successfully, but these errors were encountered: