Skip to content

Commit

Permalink
fix: use space in accept-encoding values (#1572)
Browse files Browse the repository at this point in the history
* fix for issue #1571

* Update README.md

Co-authored-by: Jimmy Wärting <jimmy@warting.se>
  • Loading branch information
tmclo and jimmywarting committed Jun 1, 2022
1 parent 0f122b8 commit a92b5d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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)_ |
Expand Down
2 changes: 1 addition & 1 deletion src/request.js
Expand Up @@ -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;
Expand Down

0 comments on commit a92b5d5

Please sign in to comment.