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();
|
$this->body = $this->getStreamForBody();
|
||||||
|
|
||||||
$contentType = $this->getHeader("Content-type");
|
$contentType = $this->getHeaderLine("Content-type");
|
||||||
if ($contentType === ["application/x-www-form-urlencoded"] || $contentType === ["multipart/form-data"]) {
|
if (strpos($contentType, "application/x-www-form-urlencoded") !== false
|
||||||
|
|| strpos($contentType, "multipart/form-data") !== false) {
|
||||||
$this->parsedBody = $_POST;
|
$this->parsedBody = $_POST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue