cvs: pear /HTTP .cvsignore HTTP.php package.xml
| From: | Stig Bakken | Date: | Mon, 08 Apr 2002 00:21:21 +0000 |
| Subject: | cvs: pear /HTTP .cvsignore HTTP.php package.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3125@lists.php.net to get a copy of this message | ||
ssb Sun Apr 7 20:21:21 2002 EDT
Added files:
/pear/HTTP .cvsignore
Modified files:
/pear/HTTP HTTP.php package.xml
Log:
* prepare for 1.2 release
Index: pear/HTTP/HTTP.php
diff -u pear/HTTP/HTTP.php:1.12 pear/HTTP/HTTP.php:1.13
--- pear/HTTP/HTTP.php:1.12 Sun Apr 7 18:56:22 2002
+++ pear/HTTP/HTTP.php Sun Apr 7 20:21:18 2002
@@ -17,15 +17,13 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: HTTP.php,v 1.12 2002/04/07 22:56:22 richard Exp $
+// $Id: HTTP.php,v 1.13 2002/04/08 00:21:18 ssb Exp $
//
// HTTP utility functions.
//
-if (!empty($GLOBALS['USED_PACKAGES']['HTTP'])) return;
-$GLOBALS['USED_PACKAGES']['HTTP'] = true;
-
-class HTTP {
+class HTTP
+{
/**
* Format a RFC compliant HTTP header. This function
* honors the "y2k_compliance" php.ini directive.
@@ -180,12 +178,13 @@
function redirect($url)
{
global $HTTP_SERVER_VARS;
- if (!preg_match('/^(ht|f)tps?:\/\//', $url)) {
+ if (!preg_match('/^(https?|ftp):\/\//', $url)) {
$context = 'http' . (@$HTTP_SERVER_VARS['HTTPS'] == 'on'
? 's' : '') . '://' . $HTTP_SERVER_VARS['SERVER_NAME'];
- if ($HTTP_SERVER_VARS['SERVER_PORT'] != 80) {
+ if ($HTTP_SERVER_VARS['SERVER_PORT'] != 80 &&
+ $HTTP_SERVER_VARS['SERVER_PORT'] != 443) {
$context .= ':' . $HTTP_SERVER_VARS['SERVER_PORT'];
}
- if ($url[0] != '/') {
+ if ($url{0} != '/') {
$context .= dirname($HTTP_SERVER_VARS['PHP_SELF']);
$url = $context . '/' . preg_replace('!^\./!', '',
$url);
} else {
Index: pear/HTTP/package.xml
diff -u pear/HTTP/package.xml:1.9 pear/HTTP/package.xml:1.10
--- pear/HTTP/package.xml:1.9 Mon Feb 18 07:32:19 2002
+++ pear/HTTP/package.xml Sun Apr 7 20:21:18 2002
@@ -1,10 +1,15 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE package SYSTEM "../package.dtd">
+<!DOCTYPE package SYSTEM "../../php4/pear/package.dtd">
<!-- do not use the "Type" attribute here, that one is only for
generated package.xml files -->
<package version="1.0">
<name>HTTP</name>
<summary>Miscellaneous HTTP utilities</summary>
+ <description>
+The HTTP class is a class with static methods for doing miscellaneous
+HTTP-related stuff like date formatting or language negotiation.
+</description>
+ <license>PHP License</license>
<maintainers>
<maintainer>
<user>SSB</user>
@@ -13,23 +18,29 @@
</maintainer>
</maintainers>
<release>
- <version>1.1</version>
+ <version>1.2</version>
<state>stable</state>
- <date>2002-02-18</date>
- <notes>
- Fixes some language negotiation bugs.
- </notes>
+ <date>2002-04-08</date>
+ <notes>New method: redirect</notes>
<filelist>
<dir name="/">
<file role="php">HTTP.php</file>
</dir>
</filelist>
</release>
- <changelog><release>
- <version>1.0</version>
- <date>2001-08-03</date>
- <notes>
+ <changelog>
+ <release>
+ <version>1.1</version>
+ <state>stable</state>
+ <date>2002-02-18</date>
+ <notes>Fixes some language negotiation bugs.</notes>
+ </release>
+ <release>
+ <version>1.0</version>
+ <date>2001-08-03</date>
+ <notes>
This is the initial independent release of the HTTP package.
</notes>
- </release></changelog>
+ </release>
+ </changelog>
</package>
Index: pear/HTTP/.cvsignore
+++ pear/HTTP/.cvsignore
*.tgz