feat(botfilter): add statusRecorder.Write
This commit is contained in:
1 parent
d72fa2299a
commit
d5d5c04a3d
1 file changed
+7
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user