diff options
author | Christian Schneider | 2018-02-14 14:23:15 +0100 |
---|---|---|
committer | Christian Schneider | 2018-02-14 14:23:15 +0100 |
commit | b1b253ed346932c5cb0d37b559bd69a29d6c0cc6 (patch) | |
tree | 4b3c5a7e9c65cfc2242dcd644f5e7aac1b3e2043 | |
parent | bf4aa22ea6f0ba4d7177e9810051a27450309f69 (diff) | |
download | itools-b1b253ed346932c5cb0d37b559bd69a29d6c0cc6.tar.gz itools-b1b253ed346932c5cb0d37b559bd69a29d6c0cc6.tar.bz2 itools-b1b253ed346932c5cb0d37b559bd69a29d6c0cc6.zip |
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
-rw-r--r-- | it_url.class | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |