-
Notifications
You must be signed in to change notification settings - Fork 473
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
Binary content no longer showing in terminal. #2325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fantastico. tendremos que testearlo. gracias.
Thanks @bogdiw for your PR. Then, the behaviour in Hurl needs to be consistent with curl:
I'm going first to implement (#2312) as a prerequisite for your PR. |
I've solved the cargo clippy errors, but the |
This test must clearly pass.
|
Ok, thank you. I'll try to fix the code then. |
Hi @bogdiw the code doesn't seem OK to me: let is_binary = response.body.iter().any(|&byte| !(32..=126).contains(&byte)); I don't understand why this condition is linked to the output being binary and doesn't seem correct to me. Could you explain it? |
Hi @jcamiel my main idea was to check whether any byte in the response body is outside the ASCII range of printable characters (32 to 126). |
I think we can have false positive doing this. |
4c89759
to
775e1e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
📆 This PR has been closed because there is no activity (commits/comments) for more than 15 days 😥. Feel free to reopen it with new commits/comments. |
Solves #2306
Added an additional check to see if the output is binary. If so, an error message is printed.