浏览代码

Force http1.1 protocol

Jordi Boggiano 10 年之前
父节点
当前提交
1cb427ff5c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Composer/Util/RemoteFilesystem.php

+ 2 - 0
src/Composer/Util/RemoteFilesystem.php

@@ -405,6 +405,8 @@ class RemoteFilesystem
         }
 
         $options = array_replace_recursive($this->options, $additionalOptions);
+        $options['http']['protocol_version'] = 1.1;
+        $headers[] = 'Connection: close';
 
         if ($this->io->hasAuthentication($originUrl)) {
             $auth = $this->io->getAuthentication($originUrl);