Closed fragsalat closed 8 years ago
@fragsalat Any interest in making a PR to fix this?
@EisenbergEffect I'll do for sure :smile: But I wanted to have to many construstion sites and wait until https://github.com/aurelia/bundler/pull/144 is done first.
Fantastic. Thank you!
This is pretty urgent: starting with the latest Chrome version (53.0.2785.143) all header names are lowercased and it breaks content-type recognition, thus breaking any Aurelia application which trusts http-client's responseType, since it accesses the header with the string Content-Type
(see http-client/http-response-message.js#L81).
I'm submitting a bug report
Please tell us about your environment:
Current behavior: The current implementation of Headers isn't case-insensitive since the
get(key: string)
function just uses the argument as an key without any normalization. If the response header name wasETag
and I try to getetag
the functionhas(key: string)
returns true because it's case insensitive, butget(key: string)
returns false because it's case sensitive.Expected/desired behavior: Regarding the RF2616 section 4.2 standard all message header names (general-, request-, response- and entity-headers) has to be handled as case insensitive.
ETag: soemthing
the functionget(key: string)
andhas(key: string)
should return true with the parameteretag
,ETAG
,ETag
and any other case combination.