composer/composer — pull request #630 by dpb587 (2012-04-27 01:48:47+00:00)
Title: Add default http(s) ports to proxy configuration if they are missing.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
[![Build Status](https://secure.travis-ci.org/dpb587/composer.png?branch=fix-implicit-proxy-ports)](http://travis-ci.org/dpb587/composer)

Some systems I've used this on didn't have the port defined in `http_proxy`. This patch will add 80/443 to http/https, respectively, if the proxy is getting converted to protocols and is missing a port. In addition to the updated unit tests, I manually tested with an http proxy (but didn't have ready access to a secure proxy).

Symptoms were either of the following two messages:

Could not read http://packagist.org/packages.json, either you or the remote host is probably offline
// or
http://packagist.org could not be loaded, package information was loaded from the local cache and may be out of date