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:
Tom 2022-06-01 20:43:48 +01:00 committed by GitHub
parent 0f122b8824
commit a92b5d5cf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -537,7 +537,7 @@ If no values are set, the following request headers will be sent automatically:
| Header | Value |
| ------------------- | ------------------------------------------------------ |
| `Accept-Encoding` | `gzip,deflate,br` _(when `options.compress === true`)_ |
| `Accept-Encoding` | `gzip, deflate, br` (when `options.compress === true`) |
| `Accept` | `*/*` |
| `Connection` | `close` _(when no `options.agent` is present)_ |
| `Content-Length` | _(automatically calculated, if possible)_ |

View File

@ -280,7 +280,7 @@ export const getNodeRequestOptions = request => {
// HTTP-network-or-cache fetch step 2.15
if (request.compress && !headers.has('Accept-Encoding')) {
headers.set('Accept-Encoding', 'gzip,deflate,br');
headers.set('Accept-Encoding', 'gzip, deflate, br');
}
let {agent} = request;