Add X-EXPECTED-ENTITY-LENGTH for HTTP/2 connections on webdav for predictive file length

This commit is contained in:
ProgrammerIn-wonderland
2026-02-02 07:51:20 -08:00
parent 3d34b36159
commit ea171e122f
2 changed files with 2 additions and 1 deletions

View File

@@ -2,6 +2,6 @@ import { toMicroCents } from '../utils.js';
export const TEMP_USER_FREE = {
id: 'temp_free',
monthUsageAllowance: toMicroCents(0.25),
monthUsageAllowance: toMicroCents(0.50),
monthlyStorageAllowance: 100 * 1024 * 1024, // 100MiB
} as const;

View File

@@ -51,6 +51,7 @@ export const HEAD_GET = async ( req, res, _filePath, fileNode, _headerLockToken
// Set Content-Length for files (not directories)
if ( ! fileStat.is_dir ) {
headers['Content-Length'] = fileStat.size || 0;
headers['x-expected-entity-length'] = fileStat.size || 0;
headers['Content-Type'] = getProperMimeType(fileStat.type, fileStat.name);
}