Sitelet https://github.com/httprb/http/issues/469
Skip to content

Improve request body io-alike objects handling #469

Description

@ixti

As of #468 pipes will cause failure:

reader, writer = IO.pipe
writer.puts "abc"
writer.close

HTTP.post(url, :body => reader)

That is because reader is an IO that supports rewind, but it's illegal on pipes:

Errno::ESPIPE: Illegal seek

So, I think we should become more strict about what is allowed to be used as request body.

@httprb/core comments and thoughts are welcomed and appreciated!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions