feat(botfilter): add statusRecorder.statusCode
This commit is contained in:
1 parent
d5d5c04a3d
commit
5ce06a210f
1 file changed
+7
@@ -120,3 +120,10 @@ func (r *statusRecorder) Write(data []byte) (int, error) {
|
||||
return r.ResponseWriter.Write(data)
|
||||
}
|
||||
|
||||
func (r *statusRecorder) statusCode() int {
|
||||
if r.status == 0 {
|
||||
return http.StatusOK
|
||||
}
|
||||
return r.status
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user