MCPcopy
hub / github.com/writefreely/writefreely / correctPageFromLoginAttempt

Function correctPageFromLoginAttempt

handle.go:922–930  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

920}
921
922func correctPageFromLoginAttempt(r *http.Request) string {
923 to := r.FormValue("to")
924 if to == "" {
925 to = "/"
926 } else if !strings.HasPrefix(to, "/") {
927 to = "/" + to
928 }
929 return to
930}
931
932func (h *Handler) LogHandlerFunc(f http.HandlerFunc) http.HandlerFunc {
933 return func(w http.ResponseWriter, r *http.Request) {

Callers 3

WebErrorsMethod · 0.85
WebMethod · 0.85
RedirectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected