-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Actual Behavior
ContentLengthPlugin has a conflict when Diactoros is used. MessageInterface::withHeader
expects a string or a string collection for the value
parameter and Diactoros
checks if value
respects this. ContentLengthPlugin inject an integer so an exception is thrown by Diactoros.
Expected Behavior
inject a string for the value
paramter into MessageInterface::withHeader
method
Steps to Reproduce
use the ContentLengthPlugin
with Diactoros
Possible Solutions
cast StreamInterface::getSize
return value in string here :
$request = $request->withHeader('Content-Length', (string) $stream->getSize());
sagikazarmark
Metadata
Metadata
Assignees
Labels
No labels