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