@@ -249,9 +249,9 @@ discard block |
||
| 249 | 249 | $path = $_SERVER['REQUEST_URI']; |
| 250 | 250 | $pos = strpos($path, '?'); |
| 251 | 251 | if (false === $pos) { |
| 252 | - $authStr = urldecode($path) . "\n" . $body; |
|
| 252 | + $authStr = urldecode($path)."\n".$body; |
|
| 253 | 253 | } else { |
| 254 | - $authStr = urldecode(substr($path, 0, $pos)) . substr($path, $pos, strlen($path) - $pos) . "\n" . $body; |
|
| 254 | + $authStr = urldecode(substr($path, 0, $pos)).substr($path, $pos, strlen($path) - $pos)."\n".$body; |
|
| 255 | 255 | } |
| 256 | 256 | // 验证签名 |
| 257 | 257 | $ok = openssl_verify($authStr, $authorization, $pubKey, OPENSSL_ALGO_MD5); |
@@ -301,8 +301,8 @@ discard block |
||
| 301 | 301 | $data = []; |
| 302 | 302 | if (!empty($customData)) { |
| 303 | 303 | foreach ($customData as $key => $value) { |
| 304 | - $callbackVar['x:' . $key] = $value; |
|
| 305 | - $data[$key] = '${x:' . $key . '}'; |
|
| 304 | + $callbackVar['x:'.$key] = $value; |
|
| 305 | + $data[$key] = '${x:'.$key.'}'; |
|
| 306 | 306 | } |
| 307 | 307 | } |
| 308 | 308 | |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | $response['expire'] = $end; |
| 351 | 351 | $response['callback'] = $base64CallbackBody; |
| 352 | 352 | $response['callback-var'] = $callbackVar; |
| 353 | - $response['dir'] = $prefix; // 这个参数是设置用户上传文件时指定的前缀。 |
|
| 353 | + $response['dir'] = $prefix; // 这个参数是设置用户上传文件时指定的前缀。 |
|
| 354 | 354 | |
| 355 | 355 | return json_encode($response); |
| 356 | 356 | } |
@@ -579,10 +579,10 @@ discard block |
||
| 579 | 579 | $path = $this->prefixer->prefixPath($path); |
| 580 | 580 | |
| 581 | 581 | if (!is_null($this->cdnUrl)) { |
| 582 | - return rtrim($this->cdnUrl, '/') . '/' . ltrim($path, '/'); |
|
| 582 | + return rtrim($this->cdnUrl, '/').'/'.ltrim($path, '/'); |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | - return $this->normalizeHost() . ltrim($path, '/'); |
|
| 585 | + return $this->normalizeHost().ltrim($path, '/'); |
|
| 586 | 586 | } |
| 587 | 587 | |
| 588 | 588 | /** |
@@ -761,7 +761,7 @@ discard block |
||
| 761 | 761 | if ($this->isCName) { |
| 762 | 762 | $domain = $this->endpoint; |
| 763 | 763 | } else { |
| 764 | - $domain = $this->bucket . '.' . $this->endpoint; |
|
| 764 | + $domain = $this->bucket.'.'.$this->endpoint; |
|
| 765 | 765 | } |
| 766 | 766 | |
| 767 | 767 | if ($this->useSSL) { |
@@ -770,7 +770,7 @@ discard block |
||
| 770 | 770 | $domain = "http://{$domain}"; |
| 771 | 771 | } |
| 772 | 772 | |
| 773 | - return rtrim($domain, '/') . '/'; |
|
| 773 | + return rtrim($domain, '/').'/'; |
|
| 774 | 774 | } |
| 775 | 775 | |
| 776 | 776 | /** |