From b1b253ed346932c5cb0d37b559bd69a29d6c0cc6 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 14 Feb 2018 14:23:15 +0100 Subject: Store result code directly in HTTP, not HTTP/1.1 or HTTP2 because we want to be able to access it without knowing protocol version --- it_url.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it_url.class b/it_url.class index cb3365d..cd0edb0 100644 --- a/it_url.class +++ b/it_url.class @@ -145,7 +145,7 @@ function parse_http_header($header) { foreach (explode("\n", trim($header)) as $line) { $line = trim($line); - if (preg_match('#^(HTTP\S+)\s(\d+)#', $line, $parts)) # Parse result code + if (preg_match('#^(HTTP)\S+\s(\d+)#', $line, $parts)) # Parse result code $this->headers[$parts[1]] = $this->result = $parts[2]; elseif (preg_match('#^([^:]+): (.*)$#', $line, $parts)) $this->headers[$parts[1]] = $parts[2]; -- cgit v1.2.3