You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encountered an Illegal seek (Errno::ESPIPE) exception while doing some chunked transfer encoding with a pipe-io as body.
The exception is raised when the body is rewinded. While a pipe-io responses to rewind it actually can't be rewinded.
Ugh. Thanks for reporting. This is what I was afraid of when we first introduced support for streams - they need to be rewound because reading them is not idempotent. I'll take a closer look in a while - it might be we simply can't log the body content in this case.
Describe the bug
Hello,
We encountered an
Illegal seek (Errno::ESPIPE)
exception while doing some chunked transfer encoding with a pipe-io as body.The exception is raised when the body is rewinded. While a pipe-io responses to
rewind
it actually can't be rewinded.httplog/lib/httplog/adapters/http.rb
Line 37 in ae519ee
In the source of the http.rb gem is a comment as to what happens when rewind is called on a pipe-io. Maybe that explains it a little better. :) https://github.com/httprb/http/blob/a0f540ffd03b29bf35bd5476b82a20fb8c3b88b8/lib/http/request/body.rb#L57
Steps to reproduce
Expected behavior
Don't raise an exception while chunked transfer encoding with pipe-io as body is used.
Environment
Have a great day! :)
Eric
The text was updated successfully, but these errors were encountered: