mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-28 11:26:16 -04:00
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.
This commit is contained in:
parent
b73d3b7243
commit
c42616006b
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue