ServerRequest parses request body when Content-type header includes expected values; allows for charset in header value.
This commit is contained in:
parent
977f89c50e
commit
db7aaa2688
|
|
@ -360,8 +360,9 @@ class ServerRequest extends Request implements ServerRequestInterface
|
|||
}
|
||||
$this->body = $this->getStreamForBody();
|
||||
|
||||
$contentType = $this->getHeader("Content-type");
|
||||
if ($contentType === ["application/x-www-form-urlencoded"] || $contentType === ["multipart/form-data"]) {
|
||||
$contentType = $this->getHeaderLine("Content-type");
|
||||
if (strpos($contentType, "application/x-www-form-urlencoded") !== false
|
||||
|| strpos($contentType, "multipart/form-data") !== false) {
|
||||
$this->parsedBody = $_POST;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue