MCPcopy
hub / github.com/writefreely/writefreely / CollectionPostOrStatic

Method CollectionPostOrStatic

handle.go:469–483  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

467}
468
469func (h *Handler) CollectionPostOrStatic(w http.ResponseWriter, r *http.Request) {
470 if strings.Contains(r.URL.Path, ".") && !isRaw(r) {
471 start := time.Now()
472 status := 200
473 defer func() {
474 log.Info(h.app.ReqLog(r, status, time.Since(start)))
475 }()
476
477 // Serve static file
478 h.app.App().shttp.ServeHTTP(w, r)
479 return
480 }
481
482 h.Web(viewCollectionPost, UserLevelReader)(w, r)
483}
484
485// Web handles requests made in the web application. This provides user-
486// friendly HTML pages and actions that work in the browser.

Callers

nothing calls this directly

Calls 4

WebMethod · 0.95
isRawFunction · 0.85
ReqLogMethod · 0.65
AppMethod · 0.65

Tested by

no test coverage detected