Closed villain-bryan closed 2 years ago
Also want to add that there seemed to be no issues when using urlencoded instead of JSON, but that isn't a solution.
The JSON sends correctly 98% of the time, but after pressing it enough times (around 50), it breaks. Not sure if VARest is to blame, or perhaps the Netty server.
@villain-bryan , I think you should check server first. I have VaRest in few projects with different setup and client-to-server requests work as they should.
You can also try it with https://httpbin.org/post as test echo server. Will it reproduce?
@villain-bryan , I think you should check server first. I have VaRest in few projects with different setup and client-to-server requests work as they should.
You can also try it with https://httpbin.org/post as test echo server. Will it reproduce?
Likely a server-side problem then. I will test in a few hours and report back with my findings.
Thank you for the speedy response!
Looks like the issue was with Netty and how we were handling HttpChunks with our ChannelInitializer (not an issue with VARest).
Our solution:
ChannelPipeline p = ch.pipeline();
p.addLast(new HttpObjectAggregator(1048576)); // don't handle HttpChunks.
Sometimes the JSON content isn't being delivered completely, making for a needle in a haystack (about 1 out of 50 attempts). Seems to happen more frequently when spamming the request, or sending a POST and a GET back and forth quickly on a keybind.
Expected content to receive on server:
Bug 1:
^ the above closing brace is missing (content as received on server).
Bug 2:
^ the above password and closing brace are missing (content as received on server)
No idea what is causing this. Running UE 5.1.0 at the moment and have tried the develop VaRest 5.0 and VaRest develop builds.