Re: Net_URL
| From: | Richard Heyes | Date: | Sat, 05 Apr 2003 11:41:39 +0000 |
| Subject: | Re: Net_URL | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14912@lists.php.net to get a copy of this message | ||
> duh, I misread your previous email as 'I think *you're* absolutely
> right.', which suprised me because I didn't think you would.
>
> So why do you think it's absolutely right the way it is?
Because that's the way I designed it. So this is possible:
$HTTP_SERVER_VARS['HTTP_HOST'] = 'localhost';
$HTTP_SERVER_VARS['PHP_SELF'] = '/foo/bar/index.php';
$url = new Net_URL('index2.php');
echo $url->getURL();
and it gives: http://localhost/foo/bar/index2.php
> A simple reproduction of this problem is:
>
> $HTTP_SERVER_VARS['HTTP_HOST']='localhost:8080';
> $url = &new Net_URL('ǰ ·Ð'2vM
> s‰™{http://www.example.com/foo/bar/index.php?foo=bar');
> print $url->getUrl();
>
> So my argument comes down to, any use of $HTTP_SERVER_VARS in the
> constructor is incorrect and should be removed.
No, it's not and it won't. There are obviously a few bugs which need
caressing, and I'll have a look at these.
--
Richard Heyes