-
-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Description
Problem
Currently, send always generates weak ETags for file stats. Some use cases require strong ETags for better HTTP caching semantics.
Proposed Solution
Add an option to generate strong ETags based on file stats:
send(req, path, {
etag: { weak: false } // strong ETag
})We can modify the source code as below
var val = etag(stat, { weak: this._etag.weak })
...Implementation preserves backward compatibility
etag: true → continues to generate weak ETags (unchanged)
etag: { weak: false } → generates strong ETags
etag: { weak: true } → generates weak ETags
etag: false → disables ETag generation (unchanged)
Would you be interested in this enhancement? I'm happy to contribute to the implementation.
Metadata
Metadata
Assignees
Labels
No labels