Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/browser/FetchHttpStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class FetchResponse implements HttpResponse {
}

getHeader(header: string): string | undefined {
return this._res.headers.get(header) || undefined
return this._res.headers.get(header) || this._res.headers.get(header.toLowerCase()) || undefined
}

getBody(): string {
Expand Down
6 changes: 5 additions & 1 deletion lib/browser/XHRHttpStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ class XHRResponse implements HttpResponse {
}

getHeader(header: string): string | undefined {
return this._xhr.getResponseHeader(header) || undefined
return (
this._xhr.getResponseHeader(header) ||
this._xhr.getResponseHeader(header.toLowerCase()) ||
undefined
)
}

getBody(): string {
Expand Down
4 changes: 3 additions & 1 deletion test/spec/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ export class TestResponse {
}

getHeader(header) {
return this._response.responseHeaders[header]
return (
this._response.responseHeaders[header] || this._response.responseHeaders[header.toLowerCase()]
)
}

getBody() {
Expand Down
Loading