Re: Net_URL -- Re: [PEAR-DEV] Some bugs in SOAP and Archive::TAR

From: Date: Fri, 04 Apr 2003 19:49:05 +0000
Subject: Re: Net_URL -- Re: [PEAR-DEV] Some bugs in SOAP and Archive::TAR
References: 1 2 3 4 5 6 7  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14897@lists.php.net to get a copy of this message
Richard Heyes wrote:
Richard Heyes wrote:
I think it's the fault of Net_URL's constructor. It gets data from _SERVER to use for all url's. This is IMO absolutely wrong. Anyone else have opinions on that?
Yup, I think it's absolutely right.
Cool :) Thought you were gone or something.
Not for another few weeks.
Would you have any problem with me fixing that?
Fixing what?
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? A simple reproduction of this problem is: $HTTP_SERVER_VARS['HTTP_HOST']='localhost:8080'; $url = &new Net_URL('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. A subclass of Net_URL can provide the local url if that functionality is needed by people. But Net_URL needs to be generic. It effects any class that uses it, such as HTTP_Request. Shane

« previous php.pear.dev (#14897) next »