Re: [Patch] PEAR::HTTP

From: Date: Tue, 23 Mar 2004 15:04:48 +0000
Subject: Re: [Patch] PEAR::HTTP
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26678@lists.php.net to get a copy of this message
(Sorry for reposting this message once more but theprevious ones appear to not have been properly handled somewhere along the line... So, I've removed the attachements for the time being...) Hi, A "couple" of things for PEAR::HTTP module:
    * New HTTP::absoluteURI() method to resolve relative URLs.
    * HTTP::absoluteURI() takes into account HTTP_HOST and PATH_INFO.
    * 4 new constants declared: HTTP_PROTOCOL_CURRENT,
      HTTP_PROTOCOL_HTTP, HTTP_PROTOCOL_HTTPS, HTTP_PROTOCOL_FTP. They
      can beused in HTTP::absoluteURI() to allow switching protocol in
      an URL (very useful)
    * HTTP::absoluteURL()  aliases HTTP::absoluteURI() for some people
      are more aware of the "URL" accronym.
    * New implementation of HTTP::negotiateLanguage(). Code is about
      twice as fast and provides more functionalities (see below)
    * HTTP::negotiateLanguage() can now accept list of language codes
      as values of array. Backward compatible with language codes as
      indexes (was awkward to use.)
    * HTTP::negotiateLanguage() can now match "fr-CA" sent to browser
      to "fr" supported languages. Default is to not do that to be
      backward compatible.
    * HTTP::negotiateLanguage() can now do case sensitive matches,
      which has the positive effect of keeping the cases in
      $supported.. Default is to not do that to be backward compatible.
    * Fixed a typo in HTTP::head() "raiseError" message (bug #1039).
    * Changed some " quotes to ' quotes to speed PHP parsing,
    * HTTP::head() can now take a timeout parameter. Default = 10
      (seconds)
    * HTTP::Date() can now be called without any parameter (current
      time is used) or with a string date (i.e. for strtotime()).
    * Backward compatibility with older PHP versions that don't
      support $_SERVER
    * HTTP::redirect() now raise a PEAR::Error (PHP > 4.3.0) when HTTP
      headers are already sent.
    * Fixed a bug in HTTP::redirect() and default port numbers.
      Redirection to HTTPS running on port 80 or HTTP running on port
      443 wouldn't add the port for relative URLs (bug #1040.)
Attached were a test.php file, a HTTP.diff and a new HTTP.php script with all the changes above. I don't know why, but they didn't get attached to my posts previously, so should I post several messages for each attachements? Thanks, -Philippe http://www.11abacus.com/


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