parent
e2d904688a
commit
6761776a8f
|
@ -253,18 +253,18 @@ class StatusUpdater {
|
||||||
// the first line would be the status code..
|
// the first line would be the status code..
|
||||||
$status_code = strtok($curl_result, "\r\n");
|
$status_code = strtok($curl_result, "\r\n");
|
||||||
// keep it general
|
// keep it general
|
||||||
// $code[1][0] = status code
|
// $code[2][0] = status code
|
||||||
// $code[2][0] = name of status code
|
// $code[3][0] = name of status code
|
||||||
$code_matches = array();
|
$code_matches = array();
|
||||||
preg_match_all("/[A-Z]{2,5}\/\d\.\d\s(\d{3})\s(.*)/", $status_code, $code_matches);
|
preg_match_all("/[A-Z]{2,5}\/\d(\.\d)?\s(\d{3})\s?(.*)/", $status_code, $code_matches);
|
||||||
|
|
||||||
if (empty($code_matches[0])) {
|
if(empty($code_matches[0])) {
|
||||||
// somehow we dont have a proper response.
|
// somehow we dont have a proper response.
|
||||||
$this->error = 'TIMEOUT ERROR: no response from server';
|
$this->error = 'TIMEOUT ERROR: no response from server';
|
||||||
$result = false;
|
$result = false;
|
||||||
} else {
|
} else {
|
||||||
$code = $code_matches[1][0];
|
$code = $code_matches[2][0];
|
||||||
$msg = $code_matches[2][0];
|
$msg = $code_matches[3][0];
|
||||||
|
|
||||||
$allow_http_status = explode("|", $this->server['allow_http_status']);
|
$allow_http_status = explode("|", $this->server['allow_http_status']);
|
||||||
// All status codes starting with a 4 or higher mean trouble!
|
// All status codes starting with a 4 or higher mean trouble!
|
||||||
|
|
Loading…
Reference in New Issue