diff --git a/README.md b/README.md index 07e0c51ba..fce3d8f13 100644 --- a/README.md +++ b/README.md @@ -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)_ | diff --git a/src/request.js b/src/request.js index a63f7e606..38f33df33 100644 --- a/src/request.js +++ b/src/request.js @@ -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;