fix: всегда закрывать тело запроса в ExtractRequest
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,8 +43,8 @@ func ExtractRequest(r *http.Request) RequestData {
|
|||||||
body = []byte("too long")
|
body = []byte("too long")
|
||||||
} else {
|
} else {
|
||||||
body, _ = io.ReadAll(r.Body)
|
body, _ = io.ReadAll(r.Body)
|
||||||
_ = r.Body.Close()
|
|
||||||
}
|
}
|
||||||
|
_ = r.Body.Close()
|
||||||
return RequestData{
|
return RequestData{
|
||||||
Time: time.Now(),
|
Time: time.Now(),
|
||||||
Method: r.Method,
|
Method: r.Method,
|
||||||
|
|||||||
Reference in New Issue
Block a user