providers/http: Make redirect function better
This commit is contained in:
parent
efc3fc0990
commit
79ac18c8c3
@ -45,11 +45,11 @@ func funcError (status int, message any) (string, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func funcRedirect (res shttp.WrappedResponseWriter, status int, pat string) (string, error) {
|
func funcRedirect (status int, pat string) (string, error) {
|
||||||
// TODO remove parameters
|
return "", shttp.Redirect {
|
||||||
res.Header.Add("Location", pat)
|
Status: status,
|
||||||
res.WriteHeader(status)
|
Location: pat,
|
||||||
return "", step.ErrExecutionCanceled
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func funcParseForm (req *http.Request) url.Values {
|
func funcParseForm (req *http.Request) url.Values {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user