Source of http://[2a01:e0b:1:47:240:63ff:fee8:c3a]/index.php/Accueil
I use Linux 2.6.24-gentoo-r3 on Gentoo release 188.8.131.52 with PHP 5.2.6RC4-pl0-gentoo, and mediawiki SVN r38180.
My mediawiki website is unaccessible from the given URL. The browser try to access the path "/" and is redirected to
http://2a01:e0b:1:47:240:63ff:fee8:c3a/index.php/Accueil, which lacks the brackets.
Here are the HTTP headers sent:
GET / HTTP/1.1
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008062122 Minefield/3.0
HTTP/1.1 301 Moved Permanently
Date: Tue, 29 Jul 2008 14:06:12 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: private, must-revalidate, max-age=0
Last-modified: Tue, 29 Jul 2008 14:06:12 GMT
Keep-Alive: timeout=15, max=100
Content-Type: text/html; charset=utf-8
As you can see, the "Location: ..." line is wrong. I searched why, and discovered that all the full URLs are contructed using $wgServer, which equals to "http://2a01:e0b:1:47:240:63ff:fee8:c3a" in the example above.
This variable is built by includes/DefaultSettings.php, thanks to $_SERVER['SERVER_NAME'], which equals to "2a01:e0b:1:47:240:63ff:fee8:c3a".
In short, we need to add brackets to IPv6 URLs. All the URLs of the website that include the server IP are wrong, such as the RSS and ATOM links. No problems with IPv4 (184.108.40.206).
I'm wondering if we can consider that this bug would be redirected to PHP, as the $_SERVER['SERVER_NAME'] variable is involved into URL building 99% of the time. Also, correcting our URLs would involve a heavy test on the variable to determine if it's an IPv6. However, $_SERVER['HTTP_HOST'] (the "Host: ..." line of the browser) could be used because it contains the brackets.
I set the bug severity to minor, because navigation from the main page is still possible, as many of the href links do not include the server IP. I also attached the wiki main page source to let you see what's in if you have not an IPv6 access.