mirror of
https://github.com/HeyPuter/puter.git
synced 2026-02-04 12:58:41 -06:00
Add X-EXPECTED-ENTITY-LENGTH for HTTP/2 connections on webdav for predictive file length
This commit is contained in:
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user