Skip to content

Commit

Permalink
check if Content-Type header exists prior to examining the value (#792)
Browse files Browse the repository at this point in the history
Co-authored-by: Jake Champion <me@jakechampion.name>
  • Loading branch information
krunalsshah and JakeChampion committed Jul 8, 2020
1 parent 0828635 commit 3c0efb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fetch.js
Expand Up @@ -515,6 +515,7 @@ export function fetch(input, init) {
xhr.responseType = 'blob'
} else if (
support.arrayBuffer &&
request.headers.get('Content-Type') &&
request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1
) {
xhr.responseType = 'arraybuffer'
Expand Down

0 comments on commit 3c0efb5

Please sign in to comment.