@superhero/http-request 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -331,7 +331,7 @@ export default class Request
|
|
|
331
331
|
HEADER_STATUS = http2.constants.HTTP2_HEADER_STATUS
|
|
332
332
|
|
|
333
333
|
upstream.statusCode = headers[HEADER_STATUS]
|
|
334
|
-
upstream.headers = headers
|
|
334
|
+
upstream.headers = { ...headers }
|
|
335
335
|
|
|
336
336
|
delete upstream.headers[HEADER_STATUS]
|
|
337
337
|
Object.defineProperty(headers, SENSITIVE_HEADERS, { value:headers[SENSITIVE_HEADERS] })
|
|
@@ -382,7 +382,7 @@ export default class Request
|
|
|
382
382
|
const response =
|
|
383
383
|
{
|
|
384
384
|
status : readable.statusCode,
|
|
385
|
-
headers :
|
|
385
|
+
headers : readable.headers
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
if((response.status >= 400 && false === !!options.doNotThrowOnErrorStatus)
|