mirror of
https://github.com/friendica/friendica
synced 2025-04-26 04:30:11 +00:00
CurlResult Tests & RegEx fix
This commit is contained in:
parent
00bf0c24b6
commit
b099cba4b4
3 changed files with 116 additions and 5 deletions
|
@ -119,7 +119,7 @@ class CurlResult
|
|||
|
||||
$header = '';
|
||||
$base = $result;
|
||||
while (preg_match('/^HTTP\/[1-2].+?[1-5][0-9][0-9]/', $base)) {
|
||||
while (preg_match('/^HTTP\/.+? \d+/', $base)) {
|
||||
$chunk = substr($base, 0, strpos($base, "\r\n\r\n") + 4);
|
||||
$header .= $chunk;
|
||||
$base = substr($base, strlen($chunk));
|
||||
|
@ -177,7 +177,7 @@ class CurlResult
|
|||
$this->redirectUrl .= '?' . $old_location_query;
|
||||
}
|
||||
|
||||
$this->isRedirectUrl = filter_var($this->redirectUrl, FILTER_VALIDATE_URL);
|
||||
$this->isRedirectUrl = filter_var($this->redirectUrl, FILTER_VALIDATE_URL) !== false;
|
||||
} else {
|
||||
$this->isRedirectUrl = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue