Skip to content

download.md: append ?action=download to archive download links - #191

Merged
cederom merged 1 commit into
apache:masterfrom
Swatantra-66:fix/download-artifact-links
Oct 4, 2026
Merged

cederom merged 1 commit into
apache:masterfrom
Swatantra-66:fix/download-artifact-links

Conversation

@Swatantra-66

Copy link
Copy Markdown
Contributor

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=download parameter, 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=download to source-os-dist and source-app-dist links in the release artifacts table.

Fixes #189

Impact

  • Direct clicks on OS and Apps links under the Archive column on nuttx.apache.org/download/ will now immediately trigger the download rather than showing a mirror selection page.
  • Fully adheres to Apache Software Foundation distribution guidelines.

Testing

Verified URL response headers via curl -I:

  • Current release (13.1.0):
    https://www.apache.org/dyn/closer.lua/nuttx/13.1.0/apache-nuttx-13.1.0.tar.gz?action=download
    Returns HTTP/1.1 302 Found with Location: https://dlcdn.apache.org/nuttx/13.1.0/apache-nuttx-13.1.0.tar.gz.
  • Archived incubator release (10.0.1):
    https://www.apache.org/dyn/closer.lua/incubator/nuttx/10.0.1/apache-nuttx-10.0.1-incubating.tar.gz?action=download
    Returns HTTP/1.1 302 Found with Location: https://archive.apache.org/dist/incubator/nuttx/10.0.1/....
  • Direct archive link (9.1.0):
    https://archive.apache.org/dist/incubator/nuttx/9.1.0/apache-nuttx-9.1.0-incubating.tar.gz?action=download
    Returns HTTP/1.1 200 OK (query parameter gracefully ignored by archive server).

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>
@cederom

cederom commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

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? :-)

@Swatantra-66

Copy link
Copy Markdown
Contributor Author

Hi @cederom!

Here is the difference between them and why closer.lua with ?action=download is the ASF-recommended standard:

  1. downloads.apache.org is the master ASF origin server. It hosts the source of truth for current releases, KEYS, signatures (.asc), and hashes (.sha512). However, ASF Infra guidelines explicitly state that release tarballs should not be served directly to the public from downloads.apache.org to protect the origin server's bandwidth (it does not redirect to CDN; it serves the full ~140MB file directly).

  2. dlcdn.apache.org is the global CDN (backed by Varnish/Fastly edge caches), which caches active release tarballs for fast global distribution. However, dlcdn only keeps current active releases (older archived releases get removed).

  3. closer.lua with ?action=download gives the best of both worlds:

    • For current releases (like 13.1.0), it issues an immediate HTTP 302 redirect directly to dlcdn.apache.org without rendering the HTML mirror page.
    • For older/incubator releases (like 10.0.1 or 9.1.1), it automatically issues an HTTP 302 redirect to archive.apache.org.
    • It complies 100% with the official ASF Release Download Policy, which mandates projects use the closer.lua dispatcher for release downloads.

So closer.lua?...?action=download ensures users get direct one-click downloads via dlcdn, while staying fully compliant with ASF infra rules and keeping older release links working!

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Swatantra-66 :-)

@cederom
cederom merged commit eb1c71a into apache:master Oct 4, 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.

release downloads url outdated

3 participants