Open
Description
I'm looking at the code here:
func DefaultDecompressHandle(c *gin.Context) {
if c.Request.Body == nil {
return
}
r, err := gzip.NewReader(c.Request.Body)
if err != nil {
c.AbortWithError(http.StatusBadRequest, err)
return
}
c.Request.Header.Del("Content-Encoding")
c.Request.Header.Del("Content-Length")
c.Request.Body = r
}
I don't see a close on the gzip.NewReader which the documentation says should be called. Is this handling close correctly?
Metadata
Metadata
Assignees
Labels
No labels