diff --git a/lib/interceptor/cache.js b/lib/interceptor/cache.js index 1b92a808f8f..e3fb202ad21 100644 --- a/lib/interceptor/cache.js +++ b/lib/interceptor/cache.js @@ -225,8 +225,11 @@ function handleResult ( let headers = { ...opts.headers, - 'if-modified-since': new Date(result.cachedAt).toUTCString(), - 'if-none-match': result.etag + 'if-modified-since': new Date(result.cachedAt).toUTCString() + } + + if (result.etag) { + headers.etag = result.etag } if (result.vary) {