diff --git a/botfilter.go b/botfilter.go index 1c5b2a90..e30efc67 100644 --- a/botfilter.go +++ b/botfilter.go @@ -113,3 +113,10 @@ func (r *statusRecorder) WriteHeader(status int) { r.ResponseWriter.WriteHeader(status) } +func (r *statusRecorder) Write(data []byte) (int, error) { + if r.status == 0 { + r.status = http.StatusOK + } + return r.ResponseWriter.Write(data) +} +