RE: [PEAR-DEV] patch to Net/URL.php to set port as CLI

From: Date: Fri, 08 Mar 2002 19:01:53 +0000
Subject: RE: [PEAR-DEV] patch to Net/URL.php to set port as CLI
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-4944@lists.php.net to get a copy of this message
> The logic in Net/URL.php to set the port to > $HTTP_SERVER_VARS['SERVER_PORT'] > if not specified otherwise has the effect of setting the port to 0 in a > command-line environment when $HTTP_SERVER_VARS is not set. The getURL() > method in Net_URL compensates for this, but if a Net_URL's host > and port are > passed to Net_Socket to open a connection (as in HTTP_Request), then > Net_Socket will think that the port is 0 and the connection will fail. > > Attached to this message is a patch to Net/URL.php to set the default port > to 80 if $HTTP_SERVER_VARS['SERVER_PORT'] is not set. No patch attached, but fixed anyway. Thanks. -- Richard Heyes "If you have any trouble sounding condescending, find a Unix user to show you how it's done." - Scott Adams

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