Skip to content

Commit

Permalink
Merge pull request #10 from elastic/correctly-handle-headers
Browse files Browse the repository at this point in the history
  • Loading branch information
delvedor authored May 11, 2020
2 parents 2fe621a + 38158dd commit 1cb0cbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ function normalizeParams (params, callback) {
querystring: { ...querystring.parse(params.querystring) }
}

const compression = params.headers['Content-Encoding'] === 'gzip'
const type = params.headers['Content-Type'] || ''
const compression = (params.headers['Content-Encoding'] || params.headers['content-encoding']) === 'gzip'
const type = params.headers['Content-Type'] || params.headers['content-type'] || ''

if (isStream(params.body)) {
normalized.body = ''
Expand Down

0 comments on commit 1cb0cbc

Please sign in to comment.