Skip to content

Commit a92b5d5

Browse files
tmclojimmywarting
andauthored
fix: use space in accept-encoding values (node-fetch#1572)
* fix for issue node-fetch#1571 * Update README.md Co-authored-by: Jimmy Wärting <[email protected]>
1 parent 0f122b8 commit a92b5d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ If no values are set, the following request headers will be sent automatically:
537537

538538
| Header | Value |
539539
| ------------------- | ------------------------------------------------------ |
540-
| `Accept-Encoding` | `gzip,deflate,br` _(when `options.compress === true`)_ |
540+
| `Accept-Encoding` | `gzip, deflate, br` (when `options.compress === true`) |
541541
| `Accept` | `*/*` |
542542
| `Connection` | `close` _(when no `options.agent` is present)_ |
543543
| `Content-Length` | _(automatically calculated, if possible)_ |

src/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export const getNodeRequestOptions = request => {
280280

281281
// HTTP-network-or-cache fetch step 2.15
282282
if (request.compress && !headers.has('Accept-Encoding')) {
283-
headers.set('Accept-Encoding', 'gzip,deflate,br');
283+
headers.set('Accept-Encoding', 'gzip, deflate, br');
284284
}
285285

286286
let {agent} = request;

0 commit comments

Comments
 (0)