Skip to content

Invalid StreamInterface::read implementation #13

Closed
@ajgarlag

Description

@ajgarlag

When I call Http\Client\Socket\Stream::read($length) method with a $length value greater than the stream size, an StreamException is thrown with the message "Cannot read more than %s"(also a sprintf call is missed here).

But the StreamInterface::read documentation describes that it can returns fewer than $length bytes, so the Http\Client\Socket\Stream::read must return the remaining stream content up to $length bytes instead of throwing an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions