MCPcopy
hub / github.com/perkeep/perkeep / ServeHTTP

Method ServeHTTP

pkg/server/ui.go:383–386  ·  view source on GitHub ↗
(rw http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

381type closureRedirector string
382
383func (base closureRedirector) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
384 newURL := string(base) + "/" + path.Clean(httputil.PathSuffix(req))
385 http.Redirect(rw, req, newURL, http.StatusTemporaryRedirect)
386}
387
388func camliMode(req *http.Request) string {
389 return req.URL.Query().Get("camli.mode")

Callers

nothing calls this directly

Calls 2

PathSuffixFunction · 0.92
CleanMethod · 0.80

Tested by

no test coverage detected