diff --git a/fsttest/recorder.go b/fsttest/recorder.go index 2283da9..88b80fc 100644 --- a/fsttest/recorder.go +++ b/fsttest/recorder.go @@ -29,11 +29,10 @@ func NewRecorder() *ResponseRecorder { // Header returns the response headers to mutate within a handler. func (r *ResponseRecorder) Header() fsthttp.Header { - if !r.headersDone { + if !r.headersSent { return r.HeaderMap } - // Once the send the headers, return a copy so any changes - // are discarded. + // Once sent, return a copy so any changes are discarded. return r.HeaderMap.Clone() }