Check content type header exists before checking its type
This commit is contained in:
parent
f81e69d7d6
commit
58241d6fe8
1 changed files with 2 additions and 1 deletions
|
@ -498,7 +498,8 @@ class Builder
|
|||
$swooleRq = $request->getSwoole();
|
||||
$swooleRq->post = $args;
|
||||
// Drop json content type so post args are used directly
|
||||
if ($swooleRq->header['content-type'] === 'application/json') {
|
||||
if (\array_key_exists('content-type', $swooleRq->header)
|
||||
&& $swooleRq->header['content-type'] === 'application/json') {
|
||||
unset($swooleRq->header['content-type']);
|
||||
}
|
||||
$request = new Request($swooleRq);
|
||||
|
|
Loading…
Reference in a new issue