mirror of
https://github.com/gin-gonic/gin.git
synced 2026-04-29 23:23:18 +08:00
Add comment for bodyAllowedForStatus to clarify 1xx response handling
This commit is contained in:
parent
762433d85e
commit
68ae08b048
@ -1034,6 +1034,7 @@ func (c *Context) requestHeader(key string) string {
|
||||
// bodyAllowedForStatus is a copy of http.bodyAllowedForStatus non-exported function.
|
||||
func bodyAllowedForStatus(status int) bool {
|
||||
switch {
|
||||
// body isn't allowed for 1xx informational responses
|
||||
case status >= http.StatusContinue && status <= 199:
|
||||
return false
|
||||
case status == http.StatusNoContent:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user