Re: Net_URL

From: Date: Sat, 05 Apr 2003 11:51:27 +0000
Subject: Re: Net_URL
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14913@lists.php.net to get a copy of this message
Just a quick coment. In the Net_URL package description it says: "Provides easy parsing of URLs and their constituent parts.", and initially I thought it was something similar to Java's java.net.URL (http://java.sun.com/j2se/1.4.1/docs/api/java/net/URL.html), but it seems that is something different? BTW, hope you have fun in the new stage in your life Richard. Maybe you can come back and play with code again after havin fun in the service ;-) Cheers. --- Richard Heyes <richard@v-webmail.org> wrote: > > 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('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 > > > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) Research: http://metallo.scripps.edu/ Personal: http://www.castagnetto.org/ __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com

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