瀏覽代碼

Fixed http check

cinamo 9 年之前
父節點
當前提交
b6b416111e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Util/RemoteFilesystem.php

+ 1 - 1
src/Composer/Util/RemoteFilesystem.php

@@ -255,7 +255,7 @@ class RemoteFilesystem
         }
 
         // Check for secure HTTP
-        if (($this->scheme === 'http' || substr($fileUrl, 0, 5) !== 'https')
+        if (($this->scheme === 'http' || substr($fileUrl, 0, 5) === 'http:')
             && $this->config && $this->config->get('secure-http')
         ) {
             // Rewrite unsecure Packagist urls to use https