blob: e421f45c0a1c4a3603478d51b87e07ad7d51edad (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package repo
import (
"fmt"
"net/http"
"strings"
wtypes "go.lindenii.runxiyu.org/forge/forged/internal/incoming/web/types"
)
func (h *HTTP) Raw(w http.ResponseWriter, r *http.Request, v wtypes.Vars) {
base := wtypes.Base(r)
repo := v["repo"]
rest := v["rest"]
if base.DirMode && rest != "" && !strings.HasSuffix(rest, "/") {
rest += "/"
}
_, _ = w.Write([]byte(fmt.Sprintf("raw: repo=%q path=%q", repo, rest)))
}
|