From: Michael J. Rubinsky Date: Mon, 29 Mar 2010 18:56:21 +0000 (-0400) Subject: need to strtolower() the key first before we ucfirst() it. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3e6d1441a7635ed9ce8078b34b356f08f22d9422;p=horde.git need to strtolower() the key first before we ucfirst() it. I'm thinking it might be easier to just put these in as-is, and assume we need to strtolower() any X-* headers for comparison. RFC2616 (HTTP/1.1) says headers are case insensitive anyway, so we probably shouldn't be relying on case for comparisons... --- diff --git a/framework/Controller/lib/Horde/Controller/Request/Http.php b/framework/Controller/lib/Horde/Controller/Request/Http.php index 633628f86..fe39e7432 100644 --- a/framework/Controller/lib/Horde/Controller/Request/Http.php +++ b/framework/Controller/lib/Horde/Controller/Request/Http.php @@ -612,9 +612,9 @@ class Horde_Controller_Request_Http extends Horde_Controller_Request_Base // Try to work with what we have... $hdr_key = substr($k, 5); $tokens = explode('_', $hdr_key); - if (count($tokens) > 0 && strlen($hdr_key) > 2) { + if (count($tokens) > 0) { foreach($tokens as $key => $value) { - $tokens[$key] = ucfirst($value); + $tokens[$key] = ucfirst(strtolower($value)); } $hdr_key = implode('-', $tokens); $mapped_result[$hdr_key] = $v;