Description
I use gin v1.9.1, but sometimes get bad json response cause by bad chunking data,but when I downgrade gin version to v1.8.2,it's ok, I guess it's a bug of sonic json and chunked encoding
How to reproduce
prepare a big struct more than 200k, use context.JSON to return then test the GET api 3000 times, you can get some bad truncated json response, judge it by postman response size
Expectations
Actual result
Environment
- go version: v1.20
- gin version (or commit ref): v1.9.1
- operating system: centos7
Comment From: sunxunkang
I noticed that the struct I used for json serialization contained combined fields because my struct referenced *appsv1.Deployment, not sure if this is a clue
Comment From: zanmato
Please add some example code to reproduce the issue. You should be able to write a test for it if it occurs after 3000 reqs