fix: use space in accept-encoding values (#1572)
* fix for issue #1571 * Update README.md Co-authored-by: Jimmy Wärting <jimmy@warting.se>
This commit is contained in:
parent
0f122b8824
commit
a92b5d5cf4
|
@ -537,7 +537,7 @@ If no values are set, the following request headers will be sent automatically:
|
||||||
|
|
||||||
| Header | Value |
|
| Header | Value |
|
||||||
| ------------------- | ------------------------------------------------------ |
|
| ------------------- | ------------------------------------------------------ |
|
||||||
| `Accept-Encoding` | `gzip,deflate,br` _(when `options.compress === true`)_ |
|
| `Accept-Encoding` | `gzip, deflate, br` (when `options.compress === true`) |
|
||||||
| `Accept` | `*/*` |
|
| `Accept` | `*/*` |
|
||||||
| `Connection` | `close` _(when no `options.agent` is present)_ |
|
| `Connection` | `close` _(when no `options.agent` is present)_ |
|
||||||
| `Content-Length` | _(automatically calculated, if possible)_ |
|
| `Content-Length` | _(automatically calculated, if possible)_ |
|
||||||
|
|
|
@ -280,7 +280,7 @@ export const getNodeRequestOptions = request => {
|
||||||
|
|
||||||
// HTTP-network-or-cache fetch step 2.15
|
// HTTP-network-or-cache fetch step 2.15
|
||||||
if (request.compress && !headers.has('Accept-Encoding')) {
|
if (request.compress && !headers.has('Accept-Encoding')) {
|
||||||
headers.set('Accept-Encoding', 'gzip,deflate,br');
|
headers.set('Accept-Encoding', 'gzip, deflate, br');
|
||||||
}
|
}
|
||||||
|
|
||||||
let {agent} = request;
|
let {agent} = request;
|
||||||
|
|
Loading…
Reference in New Issue