From c32d6b549e7d1e44742ddaa01f7af588dee71136 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 18 May 2020 15:43:36 +0200 Subject: For now normalize headers in it_url::get/request response to Capitalized-Form as code is accessing stuff like 'Location' and HTTP/2 returns lowercased headers --- it_url.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it_url.class b/it_url.class index afab941..ba91922 100644 --- a/it_url.class +++ b/it_url.class @@ -162,7 +162,7 @@ function parse_http_header($header) 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]; + $this->headers[ucwords($parts[1], '-')] = $parts[2]; if (strtolower($parts[1]) == 'set-cookie' && preg_match('/^([^=]+)=([^;]*)/', $parts[2], $cookie)) $this->cookies[$cookie[1]] = $cookie[2]; } -- cgit v1.2.3