Skip to content

#readpartial is not respecting max length argument #384

@akelmanson

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!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions