|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-03-27 07:32 UTC] mike@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: mike
[2015-03-27 07:32 UTC] mike@php.net
[2015-03-27 08:26 UTC] php at qzxj dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
Description: ------------ Using the CLI it works as I'd expect - no ports are inferred using http or https when one is not specified: $ php test.php http://example.com/yep https://example.com/yep http\Url incorrectly infers port 80 for https Url when request is made using http protocol to PHP apache2 handler: $ curl ht tp://localhost/test.php http://example.com/yep https://example.com:80/yep http\Url incorrectly infers port 443 for http Url when request is made using https protocol to PHP apache2 handler: $ curl -k ht tps://localhost/test.php http://example.com:443/yep https://example.com/yep Using PHP's development server infers the same port for both http and https: $ php -S 127.0.0.1:1234 > /tmp/php.log 2>&1 & $ curl http://localhost:1234/test.php http://example.com:1234/yep https://example.com:1234/yep Using Ubuntu 14.04 and 14.10, PHP 5.6.7, Apache 2.4. 32-bit and 64-bit. Sorry, I had to mangle some of the URLs in the curl call examples to get around the spam filter. Test script: --------------- <?php $u = new \http\Url("http://example.com/yep"); echo $u."\n"; $u = new \http\Url("https://example.com/yep"); echo $u."\n";