import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -18,9 +18,6 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Controller_Request_Exception */
require_once 'Zend/Controller/Request/Exception.php';
/** Zend_Controller_Request_Abstract */
require_once 'Zend/Controller/Request/Abstract.php';
@ -43,7 +40,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
*
*/
const SCHEME_HTTP = 'http';
/**
* Scheme for https
*
@ -237,9 +234,9 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
/**
* Set GET values
*
* @param string|array $spec
* @param null|mixed $value
*
* @param string|array $spec
* @param null|mixed $value
* @return Zend_Controller_Request_Http
*/
public function setQuery($spec, $value = null)
@ -279,9 +276,9 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
/**
* Set POST values
*
* @param string|array $spec
* @param null|mixed $value
*
* @param string|array $spec
* @param null|mixed $value
* @return Zend_Controller_Request_Http
*/
public function setPost($spec, $value = null)
@ -390,6 +387,11 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
$requestUri = $_SERVER['HTTP_X_REWRITE_URL'];
} elseif (isset($_SERVER['REQUEST_URI'])) {
$requestUri = $_SERVER['REQUEST_URI'];
// Http proxy reqs setup request uri with scheme and host [and port] + the url path, only use url path
$schemeAndHttpHost = $this->getScheme() . '://' . $this->getHttpHost();
if (strpos($requestUri, $schemeAndHttpHost) === 0) {
$requestUri = substr($requestUri, strlen($schemeAndHttpHost));
}
} elseif (isset($_SERVER['ORIG_PATH_INFO'])) { // IIS 5.0, PHP as CGI
$requestUri = $_SERVER['ORIG_PATH_INFO'];
if (!empty($_SERVER['QUERY_STRING'])) {
@ -554,7 +556,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
$basePath = $baseUrl;
}
}
if (substr(PHP_OS, 0, 3) === 'WIN') {
$basePath = str_replace('\\', '/', $basePath);
}
@ -632,8 +634,8 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
* Set allowed parameter sources
*
* Can be empty array, or contain one or more of '_GET' or '_POST'.
*
* @param array $paramSoures
*
* @param array $paramSoures
* @return Zend_Controller_Request_Http
*/
public function setParamSources(array $paramSources = array())
@ -644,7 +646,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
/**
* Get list of allowed parameter sources
*
*
* @return array
*/
public function getParamSources()
@ -872,7 +874,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
return false;
}
/**
* Is the request a Javascript XMLHttpRequest?
*
@ -887,7 +889,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
/**
* Is this a Flash request?
*
*
* @return bool
*/
public function isFlashRequest()
@ -895,7 +897,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
$header = strtolower($this->getHeader('USER_AGENT'));
return (strstr($header, ' flash')) ? true : false;
}
/**
* Is https secure request
*
@ -905,7 +907,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
{
return ($this->getScheme() === self::SCHEME_HTTPS);
}
/**
* Return the raw body of the request, if present
*
@ -955,7 +957,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
return false;
}
/**
* Get the request URI scheme
*
@ -965,7 +967,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
{
return ($this->getServer('HTTPS') == 'on') ? self::SCHEME_HTTPS : self::SCHEME_HTTP;
}
/**
* Get the HTTP host.
*
@ -981,10 +983,10 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
if (!empty($host)) {
return $host;
}
$scheme = $this->getScheme();
$name = $this->getServer('SERVER_NAME');
$port = $this->getServer('SERVER_PORT');
$port = $this->getServer('SERVER_PORT');
if (($scheme == self::SCHEME_HTTP && $port == 80) || ($scheme == self::SCHEME_HTTPS && $port == 443)) {
return $name;