Also check for empty content lenth

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-12-14 21:48:59 +01:00
parent b19b137969
commit ca70694502
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 0 deletions

View File

@ -406,6 +406,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
if ($this->method === 'PUT'
&& $this->getHeader('Content-Length') !== 0
&& $this->getHeader('Content-Length') !== null
&& $this->getHeader('Content-Length') !== ''
&& strpos($this->getHeader('Content-Type'), 'application/x-www-form-urlencoded') === false
&& strpos($this->getHeader('Content-Type'), 'application/json') === false
) {