Skip to content

Commit

Permalink
добавил все же ReadAll
Browse files Browse the repository at this point in the history
  • Loading branch information
StasMerzlyakov committed Mar 18, 2024
1 parent 278aba5 commit f2a2ead
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (h *metricOperationAdapter) PostGauge(w http.ResponseWriter, req *http.Requ

opName := "PostGauge"
_, _ = io.ReadAll(req.Body)
defer req.Body.Close()

if !h.isContentTypeExpected(TextPlain, w, req) {
return
Expand Down Expand Up @@ -209,6 +210,7 @@ func (h *metricOperationAdapter) PostCounter(w http.ResponseWriter, req *http.Re

opName := "PostCounter"
_, _ = io.ReadAll(req.Body)
defer req.Body.Close()

if !h.isContentTypeExpected(TextPlain, w, req) {
return
Expand Down

0 comments on commit f2a2ead

Please sign in to comment.