packages: If a client sets `Accept-Encoding: gzip`, the responseCache will
include `Content-Encoding: gzip` in all future responses, even if a subsequent request does not set `Accept-Encoding` or another client requests the file without setting `Accept-Encoding`. Fix that.pull/4491/head
parent
b73d3b7243
commit
c42616006b
|
@ -199,6 +199,9 @@ CachingMiddleware.prototype = new function () {
|
|||
if (supportsGzip && (headers['content-type'] || '').match(/^application\/javascript/)) {
|
||||
pathStr = pathStr + '.gz';
|
||||
headers['content-encoding'] = 'gzip';
|
||||
} else {
|
||||
// ensure responseCache is updated
|
||||
delete headers['content-encoding'];
|
||||
}
|
||||
|
||||
var lastModified = (headers['last-modified']
|
||||
|
|
Loading…
Reference in New Issue