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) {
|
||||
// TODO remove parameters
|
||||
res.Header.Add("Location", pat)
|
||||
res.WriteHeader(status)
|
||||
return "", step.ErrExecutionCanceled
|
||||
func funcRedirect (status int, pat string) (string, error) {
|
||||
return "", shttp.Redirect {
|
||||
Status: status,
|
||||
Location: pat,
|
||||
}
|
||||
}
|
||||
|
||||
func funcParseForm (req *http.Request) url.Values {
|
||||
|
Loading…
Reference in New Issue
Block a user