@jsenv/server 15.4.0 → 15.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/fetch_filesystem.js +5 -1
package/package.json
CHANGED
package/src/fetch_filesystem.js
CHANGED
|
@@ -372,6 +372,10 @@ const getMtimeResponse = async ({ headers, fileStat }) => {
|
|
|
372
372
|
};
|
|
373
373
|
|
|
374
374
|
const getCompressedResponse = async ({ fileUrl, headers }) => {
|
|
375
|
+
const contentType = CONTENT_TYPE.fromUrlExtension(fileUrl);
|
|
376
|
+
if (CONTENT_TYPE.isBinary(contentType)) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
375
379
|
const acceptedCompressionFormat = pickContentEncoding(
|
|
376
380
|
{ headers },
|
|
377
381
|
Object.keys(availableCompressionFormats),
|
|
@@ -389,7 +393,7 @@ const getCompressedResponse = async ({ fileUrl, headers }) => {
|
|
|
389
393
|
return {
|
|
390
394
|
status: 200,
|
|
391
395
|
headers: {
|
|
392
|
-
"content-type":
|
|
396
|
+
"content-type": contentType,
|
|
393
397
|
"content-encoding": acceptedCompressionFormat,
|
|
394
398
|
"vary": "accept-encoding",
|
|
395
399
|
},
|