Skip to content

Commit

Permalink
fix: correct errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aofei committed Dec 11, 2020
1 parent c92091a commit f7ca0b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions response.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ func (r *Response) Render(m map[string]interface{}, templates ...string) error {
// redirection status.
func (r *Response) Redirect(url string) error {
if r.Written {
return errors.New("air: request has been written")
return errors.New("air: response has already been written")
}

if r.Status < http.StatusMultipleChoices ||
Expand Down Expand Up @@ -597,7 +597,7 @@ func (r *Response) Push(target string, pos *http.PushOptions) error {
// 6455.
func (r *Response) WebSocket() (*WebSocket, error) {
if r.Written {
return nil, errors.New("air: request has been written")
return nil, errors.New("air: response has already been written")
}

r.Status = http.StatusSwitchingProtocols
Expand Down Expand Up @@ -683,7 +683,7 @@ func (r *Response) WebSocket() (*WebSocket, error) {
// "grpc" or "grpcs".
func (r *Response) ProxyPass(target string, rp *ReverseProxy) error {
if r.Written {
return errors.New("air: request has been written")
return errors.New("air: response has already been written")
}

if rp == nil {
Expand Down

0 comments on commit f7ca0b3

Please sign in to comment.