Skip to content
Snippets Groups Projects
Commit 82bc3958 authored by Marius Burkard's avatar Marius Burkard
Browse files

- added http status code to headers from ::post($url, $data, true)

parent 53ca1199
No related branches found
No related tags found
No related merge requests found
......@@ -250,6 +250,9 @@ abstract class ISPConfigRequest {
foreach($tmpheaders as $cur) {
if(preg_match('/^(\w+)\:\s*(.*)$/is', $cur, $matches)) {
$headers["$matches[1]"] = trim($matches[2]);
} elseif(strpos($cur, ':') === false && substr($cur, 0, 5) === 'HTTP/') {
$headers['status'] = $header;
$headers['http_code'] = intval(preg_replace('/^HTTP\/\d+\.\d+\s+(\d+)\s+.*$/', '$1', $header));
}
}
return array($headers, $response);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment