fix(object): fix content length limit

Signed-off-by: tangdeyi <tangdeyi@oppo.com>
This commit is contained in:
tangdeyi 2023-10-31 18:37:01 +08:00 committed by tangdeyi
parent 5f3c8e3a25
commit 9b14adf492

View File

@ -2216,7 +2216,7 @@ func VerifyContentLength(r *http.Request, bodyLimit int64) (int64, *ErrorCode) {
if length > bodyLimit {
return 0, EntityTooLarge
}
if length <= 0 {
if length < 0 {
return 0, MissingContentLength
}
return length, nil