Skip to content

Commit

Permalink
fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydaly committed Dec 24, 2018
1 parent c2e0f2f commit 446044b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ class REQUEST {
this.rawHeaders = this._multiValueSupport ?
Object.keys(this.app._event.multiValueHeaders).reduce((headers,key) =>
Object.assign(headers,{ [key]: UTILS.fromArray(this.app._event.multiValueHeaders[key]) }),{})
: this.app._event.headers || {}
: this.app._event.headers || {}

// Set the headers to lowercase
this.headers = Object.keys(this.rawHeaders).reduce((acc,header) =>
Object.assign(acc,{[header.toLowerCase()]:this.rawHeaders[header]}), {})

this.multiValueHeaders = this._multiValueSupport ? this.app._event.multiValueHeaders
: Object.keys(this.headers).reduce((headers,key) =>
Object.assign(headers,{ [key.toLowerCase()]: [this.headers[key]] }),{})
Object.assign(headers,{ [key.toLowerCase()]: [this.headers[key]] }),{})

// Extract user agent
this.userAgent = this.headers['user-agent']
Expand Down

0 comments on commit 446044b

Please sign in to comment.