Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Dealing with big/text body #97

Open
joelwurtz opened this issue Mar 7, 2018 · 1 comment
Open

[RFC] Dealing with big/text body #97

joelwurtz opened this issue Mar 7, 2018 · 1 comment

Comments

@joelwurtz
Copy link
Member

joelwurtz commented Mar 7, 2018

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 ?

@dbu
Copy link
Contributor

dbu commented Mar 7, 2018

sounds reasonable to me, to increase consistency and reduce the risk of debugging changing how the application works. i guess these will be guidelines and then we apply them to the plugins we manage? or could we code these into a trait that such plugins can use?

i would not consider it a BC break if we do not reduce functionality. if the logger or debug panel sometimes show less information with the changes, i think that would be acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants