mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-15 04:57:07 +08:00
Merge branch 'upgrade-sonic' into upgrade-sonic-test-go1.25
This commit is contained in:
commit
c05f7c1619
@ -1991,13 +1991,12 @@ func TestContextContentType(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestContextBindRequestTooLarge(t *testing.T) {
|
||||
// When using sonic or go-json as JSON encoder, they do not propagate the http.MaxBytesError error
|
||||
// When using go-json as JSON encoder, they do not propagate the http.MaxBytesError error
|
||||
// The response will fail with a generic 400 instead of 413
|
||||
// https://github.com/goccy/go-json/issues/485
|
||||
// https://github.com/bytedance/sonic/issues/800
|
||||
var expectedCode int
|
||||
switch json.Package {
|
||||
case "github.com/goccy/go-json", "github.com/bytedance/sonic":
|
||||
case "github.com/goccy/go-json":
|
||||
expectedCode = http.StatusBadRequest
|
||||
default:
|
||||
expectedCode = http.StatusRequestEntityTooLarge
|
||||
|
Loading…
x
Reference in New Issue
Block a user