use k.title() when compared

keys returned by headers.items() or getheaders are always in lower case, so, title it before compare with string.