From 3e6d1441a7635ed9ce8078b34b356f08f22d9422 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 29 Mar 2010 14:56:21 -0400 Subject: [PATCH] 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... --- framework/Controller/lib/Horde/Controller/Request/Http.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.11.0