EllisLab/CodeIgniter — pull request #2107 by danhunsaker (2012-12-31 16:26:21+00:00)
Title: Fixed normalization of headers under Apache

The existing header normalization routine converts headers provided by Apache (that is, with `-` in the name instead of `_`) to all lowercase, with the exception of the first character. This is different from the expected result, wherein each word of the header is capitalized. For example, `CONTENT-LENGTH` would normalize to `Content-length` instead of the expected `Content-Length`. The reason for this is that the existing code is only converting underscores to spaces, and leaving hyphens untouched. The fix is to replace hyphens with spaces as well before passing the result through `ucwords()`.

That fix is included here.

Signed-off-by: Daniel Hunsaker