Skip to content

Commit 15cc6cb

Browse files
authored
Merge pull request #29 from lantongxue/patch-2
修复Request对象getRawBody()为空的问题
2 parents 9b654a9 + dfaa655 commit 15cc6cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/web/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getIsFlash()
137137
public function getRawBody()
138138
{
139139
if ($this->_rawBody === null) {
140-
$this->_rawBody = file_get_contents("php://input");
140+
$this->_rawBody = $this->swooleRequest->rawContent();
141141
return $this->_rawBody;
142142
}
143143

@@ -770,4 +770,4 @@ private function validateCsrfTokenInternal($clientSuppliedToken, $trueToken)
770770

771771
return $security->unmaskToken($clientSuppliedToken) === $security->unmaskToken($trueToken);
772772
}
773-
}
773+
}

0 commit comments

Comments
 (0)