square/okhttp — pull request #462 by adriancole (2014-01-19 22:09:27+00:00)
Title: Change spdy and http/2 headers to always lowercase

Change spdy and http/2 headers to always lowercase header names. This avoids allocation and shortens runtime of header name comparison. It does so by down-casing header names as bytes are read from the server. With this in mind, the case-insensitive comparison only needs to concern itself with mixed case of the compared header.

I profiled case-insensitive comparison on both sides vs comparing lowercase to mixed case and found the latter between 3.4 and 9.2% faster runtime.