composer: File could not be downloaded behind a proxy

Hi,

I can’t download any git repos behind a proxy with composer since few days. Composer can update itselfs, but no other git repos.

For example:

$ php composer.phar create-project symfony/framework-standard-edition path/ 2.2.1

results in:

[Composer\Downloader\TransportException]
The "https://api.github.com/repos/symfony/symfony-standard/zipball/v2.2.1" file could not be downloaded (HTTP/1.0 500 Internal Server Error)

System configuration:

  • configured enviroment http_proxy & https_proxy
  • PHP 5.4.14
  • Composer 81d55544f714cca03d5eb784d67a06f8148bcb15

The proxy configuration works fine (Mozilla, Thunderbird, …). Downloading the file with wget or curl works too:

$ wget https://api.github.com/repos/symfony/symfony-standard/zipball/v2.2.1

Any advice?

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 25 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@Seldaek after updating composer to it’s latest release and configuring:

  • HTTP_PROXY_REQUEST_FULLURI=true (or unset)
  • HTTPS_PROXY_REQUEST_FULLURI=false

it works like a charm here. Thanks!

I added a new HTTPS_PROXY_REQUEST_FULLURI since it seems some proxies are acting up really strange. Can you confirm that setting HTTPS_PROXY_REQUEST_FULLURI=false fixes it? It should disable it for HTTPS, but if you enable it (or just delete the env var) for HTTP then everything should work… Hopefully 😃

Configuring the HTTP_PROXY_REQUEST_FULLURI enviroment variable like:

$ export HTTP_PROXY_REQUEST_FULLURI=false

resolves the problem. Great!