curl: avoid styled output with binary output#2774
Conversation
For the purpose of binary output, The curl program should output as is without styled code. Reported-by: Jumpei Anzai Suggested-by: cvmat(Tadashi MATSUO)
|
Why? |
|
@bagder @JunpeiAnzai I am sorry that the original problem in hayamiz/twittering-mode#149 may be caused by my code in http://github.com/hayamiz/twittering-mode . I had written a code that implicitly used a pty for communicating with an asynchronously invoked curl. However, I think that this pull request may improve the behavior of curl. The "problem" mentioned in this request is decoration of headers in the case where options explicitly allows binary body, not the lack of BOLDOFF sequence. The latest version of curl outputs decorated headers even if curl is invoked with the option |
Sure, but the header decoration is there because you use
Why? Allowing a binary body on the terminal is a way to make sure curl doesn't wrongly prohibit the body because the user knows better that it can be shown fine. It says nothing about the headers in the response! I think you should rather explicitly disable the header decoration with Alternatively, you can pipe the output through cat and thereby "trick" curl to not know it sends the data to terminal:
|
Description
For the purpose of binary output, The curl program should output as is
without styled code.
Observed behaviour
Expected behaviour