Skip to content

Commit b458457

Browse files
committed
Looking again we don't need this writeHeader as all of our downstream
implementations will always do it for us Signed-off-by: Andrew Thornton <[email protected]>
1 parent e9b709b commit b458457

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/context/response.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ func (r *Response) Write(bs []byte) (int, error) {
4343
}
4444
r.beforeExecuted = true
4545
}
46-
if r.status == 0 {
47-
r.WriteHeader(200)
48-
}
4946
size, err := r.ResponseWriter.Write(bs)
5047
r.written += size
5148
if err != nil {
5249
return size, err
5350
}
51+
if r.status == 0 {
52+
r.status = http.StatusOK
53+
}
5454
return size, nil
5555
}
5656

0 commit comments

Comments
 (0)