split->explode for simpletest
This commit is contained in:
parent
1982740386
commit
d4b8d29e6a
@ -316,7 +316,7 @@ class SimpleHttpHeaders {
|
||||
$this->_cookies = array();
|
||||
$this->_authentication = false;
|
||||
$this->_realm = false;
|
||||
foreach (split("\r\n", $headers) as $header_line) {
|
||||
foreach (explode("\r\n", $headers) as $header_line) {
|
||||
$this->_parseHeaderLine($header_line);
|
||||
}
|
||||
}
|
||||
@ -521,7 +521,7 @@ class SimpleHttpResponse extends SimpleStickyError {
|
||||
$this->_setError('Could not split headers from content');
|
||||
$this->_headers = &new SimpleHttpHeaders($raw);
|
||||
} else {
|
||||
list($headers, $this->_content) = split("\r\n\r\n", $raw, 2);
|
||||
list($headers, $this->_content) = explode("\r\n\r\n", $raw, 2);
|
||||
$this->_headers = &new SimpleHttpHeaders($headers);
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ class SimpleUrl {
|
||||
function _parseRequest($raw) {
|
||||
$this->_raw = $raw;
|
||||
$request = new SimpleGetEncoding();
|
||||
foreach (split("&", $raw) as $pair) {
|
||||
foreach (explode("&", $raw) as $pair) {
|
||||
if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
|
||||
$request->add($matches[1], urldecode($matches[2]));
|
||||
} elseif ($pair) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user