Skip to content
Myr

Fixes bug when status code is negative

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Manu Mtz-Almeida · committed by Manu Mtz-Almeida · parent 45fcd18 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:response_writer.go+1 added-1 removed
25 unmodified lines
26 w.written = false27}2829func (w *responseWriter) WriteHeader(code int) {30 if code != 0 {30 if code > 0 {31 w.status = code32 if w.written {33 log.Println("[GIN] WARNING. Headers were already written!")34 }
22 unmodified lines