Repository navigation
download.md: append ?action=download to archive download links - #191
Conversation
Release artifact links in the Archive column use release.artifact-root, which points to the mirror selector (dyn/closer.lua). Without the ?action=download parameter, clicking OS or Apps links navigates to an HTML mirror-selection page rather than directly triggering the file download. In accordance with ASF Distribution Policy (https://infra.apache.org/release-download-pages.html#closer), append ?action=download to release.source-os-dist and release.source-app-dist links so closer.lua responds with an HTTP 302 redirect directly to the resolved mirror (e.g. dlcdn.apache.org) or archive.apache.org for older releases. Fixes apache#189 Signed-off-by: Swatantra Yadav <maverickswatantra@gmail.com>
|
Thank you @Swatantra-66 :-) How about we use https://downloads.apache.org/nuttx/13.1.0/apache-nuttx-13.1.0.tar.gz and https://downloads.apache.org/nuttx/13.1.0/apache-nuttx-apps-13.1.0.tar.gz so all links use the same https://downloads.apache.org/nuttx/ base? :-) Do you know what is the difference between https://downloads.apache.org/ and https://dlcdn.apache.org/ ? Does downloads redirect to dlcdn? I guess it is better to use dlcdn right? :-) |
|
Hi @cederom! Here is the difference between them and why
So |
cederom
left a comment
There was a problem hiding this comment.
Thank you @Swatantra-66 :-)
Summary
Release artifact links in the Archive column of download.md use
{{ release.artifact-root }}, which points to Apache's mirror selector (https://www.apache.org/dyn/closer.lua/...). Without the?action=downloadparameter, clicking OS or Apps downloads navigates users to an HTML mirror-picker webpage instead of directly downloading the release tarball.In accordance with official ASF Release Download Pages Policy, this PR appends
?action=downloadtosource-os-distandsource-app-distlinks in the release artifacts table.Fixes #189
Impact
nuttx.apache.org/download/will now immediately trigger the download rather than showing a mirror selection page.Testing
Verified URL response headers via
curl -I:https://www.apache.org/dyn/closer.lua/nuttx/13.1.0/apache-nuttx-13.1.0.tar.gz?action=downloadReturns
HTTP/1.1 302 FoundwithLocation: https://dlcdn.apache.org/nuttx/13.1.0/apache-nuttx-13.1.0.tar.gz.https://www.apache.org/dyn/closer.lua/incubator/nuttx/10.0.1/apache-nuttx-10.0.1-incubating.tar.gz?action=downloadReturns
HTTP/1.1 302 FoundwithLocation: https://archive.apache.org/dist/incubator/nuttx/10.0.1/....https://archive.apache.org/dist/incubator/nuttx/9.1.0/apache-nuttx-9.1.0-incubating.tar.gz?action=downloadReturns
HTTP/1.1 200 OK(query parameter gracefully ignored by archive server).