akamai / httpie-edgegrid

Plugin for httpie to allow edge grid authentication for Akamai
Apache License 2.0
67 stars 22 forks source link

DXE-2227 Broken pipe error when piping output to head #36

Closed bacalec closed 1 year ago

bacalec commented 1 year ago

Hello, When standard output is piped to head, it can yield this error when the output is long enough: http: error: BrokenPipeError: [Errno 32] Broken pipe

Traceback starts with httpie/output/writer.py", line 67, in write_stream buf.write(chunk)

More on this topic: https://stackoverflow.com/questions/34718208/catch-broken-pipe-in-python-2-and-python-3 https://docs.python.org/3/library/signal.html#note-on-sigpipe http://newbebweb.blogspot.com/2012/02/python-head-ioerror-errno-32-broken.html

wzagrajcz commented 1 year ago

Hello @bacalec Thank You for opening the issue. Based on provided information it looks like it's a problem with httpie itself, rather then httpie-edgegrid. Our tool enables to use easy Akamai authentication inside httpie tool. The line mentioned in traceback looks like: https://github.com/httpie/httpie/blob/master/httpie/output/writer.py#L74

To be sure that there is no issue on our side, were You able to use httpie with httpie-edgegrid at all succcessfully? If You were, please consider opening the issue in httpie GH.

Best regards, Wojciech

bacalec commented 1 year ago

Hello @wzagrajcz Thank you for looking into this,

Yes, I can use httpie-edgegrid successfully when i don't pipe standard output to head.

I was using old version of httpie (2.4.0) I don't reproduce the error with latest version of httpie (3.2.1).

Sorry for the confusion.