From d510b68c0d167d26964da3a8d3aa37df4ecb2866 Mon Sep 17 00:00:00 2001 From: Mukul Khanna Date: Tue, 26 Feb 2019 06:25:45 +0530 Subject: [PATCH 1/3] doc: added example for setting Vary: Accept-Encoding header in zlib.md --- doc/api/zlib.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index f4bcaf95a204e7..8016ce20edea41 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -107,6 +107,8 @@ const http = require('http'); const fs = require('fs'); http.createServer((request, response) => { const raw = fs.createReadStream('index.html'); + // instruct the proxy to store both a compressed and uncompressed version of the resource + response.setHeader('Vary: Accept-Encoding'); let acceptEncoding = request.headers['accept-encoding']; if (!acceptEncoding) { acceptEncoding = ''; From 83335eaae3e52646fb4570fb8b34ebbfb6a0adce Mon Sep 17 00:00:00 2001 From: Mukul Khanna Date: Tue, 26 Feb 2019 13:37:55 +0530 Subject: [PATCH 2/3] docs: adhere to linting rules --- doc/api/zlib.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 8016ce20edea41..e3d1669bb59de7 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -107,7 +107,7 @@ const http = require('http'); const fs = require('fs'); http.createServer((request, response) => { const raw = fs.createReadStream('index.html'); - // instruct the proxy to store both a compressed and uncompressed version of the resource + // To store both, a compressed and an uncompressed version of the resource. response.setHeader('Vary: Accept-Encoding'); let acceptEncoding = request.headers['accept-encoding']; if (!acceptEncoding) { From 2b7f3942cd7bc418ff26f3a7cad1b83c910ea4cc Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 26 Feb 2019 21:17:31 +0530 Subject: [PATCH 3/3] Fixes: https://github.com/nodejs/node/issues/25495 Co-Authored-By: mukulkhanna --- doc/api/zlib.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index e3d1669bb59de7..6efc2a709c339d 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -107,7 +107,7 @@ const http = require('http'); const fs = require('fs'); http.createServer((request, response) => { const raw = fs.createReadStream('index.html'); - // To store both, a compressed and an uncompressed version of the resource. + // Store both a compressed and an uncompressed version of the resource. response.setHeader('Vary: Accept-Encoding'); let acceptEncoding = request.headers['accept-encoding']; if (!acceptEncoding) {