Skip to content

Commit

Permalink
Fix log http status 0 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwo committed Oct 24, 2017
1 parent 2b0626f commit 3e867e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contexts/contexts.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func HTTPStatus(c context.Context) (int, bool) {
status := http.StatusOK // Default
sw, ok := c.Value(statusKey).(*statusWriter)

if ok {
if ok && sw.status != 0 {
status = sw.status
}

Expand Down

0 comments on commit 3e867e3

Please sign in to comment.