Skip to content

[RFC] Dealing with big/text body #97

Description

@joelwurtz
Q A
Bug? no
New Feature? yes

Actual Behavior

Actually all plugin dealing with body check if the stream is seekable and also made arrengments when body is too long via an arbitrary value

Expected Behavior

It would be nice to base our default behavior by reading the Content-Type header of the request / response and use the https://github.com/php-http/message/blob/master/src/Stream/BufferedStream.php when a body is not seekable

As an example the logger plugin would have a list of content type authorized for logging (json / text / html / ....) and if stream not seekable, it would be decorated with the BufferedStream class

WDYT ? Is something like this considered as a BC Break ?

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