mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-10 14:44:37 +08:00
Merge 68ae08b048e21eb28e516e1d50d33dfa2f06d258 into ac95fa6bbcf5ec102bc81fbbb70e8fccba90f0b1
This commit is contained in:
commit
01d5519282
@ -1047,7 +1047,8 @@ func (c *Context) requestHeader(key string) string {
|
||||
// bodyAllowedForStatus is a copy of http.bodyAllowedForStatus non-exported function.
|
||||
func bodyAllowedForStatus(status int) bool {
|
||||
switch {
|
||||
case status >= 100 && status <= 199:
|
||||
// body isn't allowed for 1xx informational responses
|
||||
case status >= http.StatusContinue && status <= 199:
|
||||
return false
|
||||
case status == http.StatusNoContent:
|
||||
return false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user