Skip to content

#readpartial is not respecting max length argument #384

Description

@akelmanson

Hi there,

According to IO#readpartial documentation, this method "reads at most maxlen bytes from the I/O stream", but HTTP::Response::Body#readpartial is returning more bytes than expected.

HTTP.get('http://www.rubydoc.info/github/httprb/http').body.readpartial(10).length

oj calls this method within C code and this misbehavior leads to Segmentation fault.

Thank you!

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions