Skip to content

Commit ad61c0f

Browse files
committed
fix(gin): update request body size check to allow zero limit
1 parent 9addf1b commit ad61c0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/gin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func GetRequestBody(c *gin.Context) ([]byte, error) {
4040
}
4141
}
4242
maxMB := constant.MaxRequestBodyMB
43-
if maxMB < 0 {
43+
if maxMB <= 0 {
4444
// no limit
4545
body, err := io.ReadAll(c.Request.Body)
4646
_ = c.Request.Body.Close()

0 commit comments

Comments
 (0)