Skip to content

download: send Last-Modified based on the served revision#12

Merged
jelmer merged 1 commit into
masterfrom
download-last-modified
Apr 21, 2026
Merged

download: send Last-Modified based on the served revision#12
jelmer merged 1 commit into
masterfrom
download-last-modified

Conversation

@jelmer

@jelmer jelmer commented Apr 21, 2026

Copy link
Copy Markdown
Member

The tip-based last_modified middleware set Last-Modified on every response to the branch tip's commit time, which is wrong for downloads of files/tarballs from older revisions. Emit the header from the download handlers using the served revision's timestamp, and let the middleware skip responses that already carry one.

Fixes: https://bugs.launchpad.net/loggerhead/+bug/503144

The tip-based last_modified middleware set Last-Modified on every
response to the branch tip's commit time, which is wrong for
downloads of files/tarballs from older revisions. Emit the header
from the download handlers using the served revision's timestamp,
and let the middleware skip responses that already carry one.

Fixes: https://bugs.launchpad.net/loggerhead/+bug/503144
@jelmer
jelmer merged commit a74f8b8 into master Apr 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant