Explorar o código

Force http1.1 protocol

Jordi Boggiano %!s(int64=10) %!d(string=hai) anos
pai
achega
1cb427ff5c
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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);