Browse Source

Merge branch 'topic' of yanglin/logSystem-advance into master

yanglin 6 years ago
parent
commit
988e70f857
1 changed files with 7 additions and 5 deletions
  1. 7 5
      components/Secret.php

+ 7 - 5
components/Secret.php

@@ -50,18 +50,20 @@ class Secret extends Component
 			static::throwError("headers verb avail.");
 
 		$strMd5 = $headers->get('content-md5');
-		if (!$this->checkContentMd5($strVerb, $strMd5, Yii::$app->request->getBodyParams()))
+		if (!$this->checkContentMd5($strVerb, $strMd5, Yii::$app->request->getBodyParams())){
 //			static::throwError("headers content md5 avail.");
-
-		$strContentType = $headers->get('content-type');
-		if ($strContentType !== $this->_contentType)
+        }
+        $strContentType = $headers->get('content-type');
+		if ($strContentType !== $this->_contentType){
 //			static::throwError("headers content type avail.");
+        }
 
 		//$strDate = gmdate("D, d M Y H:i:s \G\M\T");
 		$strDate = $headers->get('date');
 		$strTime = strtotime($strDate);
-		if ($strDate == false || $strTime-time() > 0 || time()-$strTime > $this->_timeout)
+		if ($strDate == false || $strTime-time() > 0 || time()-$strTime > $this->_timeout){
 //			static::throwError("headers date avail.");
+        }
 
 		$strSM = $headers->get('signature-method');
 		if (strtoupper($strSM) != strtoupper($this->_signatureMethod))