summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorChristian Schneider2020-05-18 15:43:36 +0200
committerChristian Schneider2020-05-18 15:43:36 +0200
commitc32d6b549e7d1e44742ddaa01f7af588dee71136 (patch)
tree7f2879d38629cdfd76706cc1369b112e9cbd0924 /it_url.class
parent7188813206706d7780e0d08ccddb49fc79871a45 (diff)
downloaditools-c32d6b549e7d1e44742ddaa01f7af588dee71136.tar.gz
itools-c32d6b549e7d1e44742ddaa01f7af588dee71136.tar.bz2
itools-c32d6b549e7d1e44742ddaa01f7af588dee71136.zip
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
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class2
1 files changed, 1 insertions, 1 deletions
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];
}