2 Commits
Author SHA1 Message Date
Shawn WebbandLorenz Leutgeb ad8b0699b4 httpd: Generate a prefix for Git archive downloads
GitHub and GitLab will prefix archive payloads with the name of the repo
and the refspec. This patch naively applies a prefix in similar fashion.

The refspec might contain filesystem path separators, like a forward
slash (`/`). GitHub and GitLab replace that with a hyphen (`-`). This
patch applies that same replacement.

The file name that is suggested to browsers (via the HTTP header
`Content-Disposition`) is changed to match the prefix.

The additional archive formats `tar` and `zip` are now supported as
well.

Users that relied on the archive *not* carrying the prefix introduced
here, may pass the query `?prefix=false` to get the old behavior.
This does not affect the `Content-Disposition` header, though. Users
who relied on the downloaded file be named in a certain way after,
and also used the file name from `Content-Disposition` for the name,
cannot get back the old behavior, but must instead rename the file.

Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.dev>
2026-04-27 14:23:23 +02:00
Shawn Webb e0c75d4204 Fix shebang lines for a few scripts
On the BSDs, bash is typically installed in /usr/local/bin.

Signed-off-by:	Shawn Webb <shawn.webb@hardenedbsd.org>
2024-05-08 20:34:47 +00:00