codeguy/Slim — pull request #255 by benpjohnson (2012-03-07 23:28:20+00:00)
Title: Develop

Hi,

I've been playing with the new PHP5.4 web server running on a non-standard port and noticed the getHostWithPort() method returning host:port:port so I had a dig around and found the current methods don't handle the case of Host including a port which seems to be part of the spec:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23

I've knocked up a couple of tests to reproduce the issue along with a fix. I fixed this in Request rather than Environment as I imagined you would want Environment itself to reflect the actual server environment.

Best Regards,

Ben