mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 07:51:38 +02:00
perf: further optimize http and body buffer handling
This commit is contained in:
@@ -92,7 +92,7 @@ func (m *forwardAuthMiddleware) before(w http.ResponseWriter, r *http.Request) (
|
||||
|
||||
if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusMultipleChoices {
|
||||
body, release, err := httputils.ReadAllBody(resp)
|
||||
defer release()
|
||||
defer release(body)
|
||||
|
||||
if err != nil {
|
||||
ForwardAuth.LogError(r).Err(err).Msg("failed to read response body")
|
||||
|
||||
Reference in New Issue
Block a user