Skip to content

Commit

Permalink
Update context.go
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei authored Jan 16, 2024
1 parent 607a356 commit b956064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func acceptNext(accept string) (item, left string) {
// which may be a path relative to the request path.
func (p *Context) Redirect(url string, code ...int) {
statusCode := http.StatusFound
if code == nil {
if code != nil {
statusCode = code[0]
}
http.Redirect(p.ResponseWriter, p.Request, url, statusCode)
Expand Down

0 comments on commit b956064

Please sign in to comment.