diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-05 19:45:17 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-05 19:45:17 +0800 |
commit | 54a19febc0c7c49caa014254cabab571abad60ab (patch) | |
tree | a0b5ffe5aaaff956d5d41b09ca1d2127f771d17a /http_handle_repo_raw.go | |
parent | git2c: Fix regression in potential integer overflow (diff) | |
download | forge-54a19febc0c7c49caa014254cabab571abad60ab.tar.gz forge-54a19febc0c7c49caa014254cabab571abad60ab.tar.zst forge-54a19febc0c7c49caa014254cabab571abad60ab.zip |
misc: Move url.go into the misc package
Diffstat (limited to 'http_handle_repo_raw.go')
-rw-r--r-- | http_handle_repo_raw.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go index ea2925c..3a4e152 100644 --- a/http_handle_repo_raw.go +++ b/http_handle_repo_raw.go @@ -10,6 +10,7 @@ import ( "strings" "go.lindenii.runxiyu.org/forge/git2c" + "go.lindenii.runxiyu.org/forge/misc" ) // httpHandleRepoRaw serves raw files, or directory listings that point to raw @@ -43,7 +44,7 @@ func httpHandleRepoRaw(writer http.ResponseWriter, request *http.Request, params params["readme"] = template.HTML("<p>README rendering here is WIP again</p>") // TODO renderTemplate(writer, "repo_raw_dir", params) case content != "": - if redirectNoDir(writer, request) { + if misc.RedirectNoDir(writer, request) { return } writer.Header().Set("Content-Type", "application/octet-stream") |