mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-12 00:28:37 +08:00
Compare commits
3 Commits
5c373d05a3
...
c34bae6914
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c34bae6914 | ||
|
|
68ae08b048 | ||
|
|
762433d85e |
@ -1057,7 +1057,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