mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-06 03:08:11 +08:00
Use http.StatusContinue constant for clarity in status code comparison
This commit is contained in:
parent
9914178584
commit
762433d85e
@ -1034,7 +1034,7 @@ 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:
|
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