php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43632 HTTP_HOST and IPv6 address
Submitted: 2007-12-19 00:40 UTC Modified: 2008-01-29 00:18 UTC
Votes:2
Avg. Score:1.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: u7vd8gw2725h59sm at yopmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.5 OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: u7vd8gw2725h59sm at yopmail dot com
New email:
PHP Version: OS:

 

 [2007-12-19 00:40 UTC] u7vd8gw2725h59sm at yopmail dot com
Description:
------------
With an IPv6 address, HTTP_HOST should be for example [::1]:8080 and not  
::1:8080

For example IPv6 URI:
http://[::1]:8080/
http://user:password[::1]:8081/
http://[::1]:80/dir/file
http://[::1]:8000/dir/file?q=query






Reproduce code:
---------------
<?php echo $_SERVER["HTTP_HOST"]; ?>

Expected result:
----------------
[::1]:8080

Actual result:
--------------
::1:8080

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-22 17:18 UTC] jani@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2007-12-30 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-01-02 22:39 UTC] u7vd8gw2725h59sm at yopmail dot com
The bug is "the lack of SQUARE BRACKETS" for the IPv6 address (in 
HTTP_HOST).
A valid IPv6 address is (for example): http://[2001:4978:1:110:0:ac:ce55:1b1e]:80/
And HTTP_HOST should be: [2001:4978:1:110:0:ac:ce55:1b1e]:80
And not: 2001:4978:1:110:0:ac:ce55:1b1e:80
 [2008-01-29 00:18 UTC] tony2001@php.net
Variables like HTTP_HOST come directly from Apache.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 09 02:01:30 2025 UTC