fixed receiving responses from score server 4.3.0.2
authorHolger Schemel <info@artsoft.org>
Wed, 1 Dec 2021 11:21:12 +0000 (12:21 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 1 Dec 2021 11:21:12 +0000 (12:21 +0100)
commit9695a8edd4c617065b02433dd649266e2d154ad3
treeebb6b76fc92d61ae3f6e624696fc20dba6eb77f3
parent5ef03dad78a0ee430c749e2697d78f1ca1d19faa
fixed receiving responses from score server

This commit fixes problems with receiving (slightly) larger responses
from the score server, causing high score lists with many entries to
be cut off after a few dozen entries.

This bug was caused by misleading documentation of SDL_net function
"SDLNet_TCP_Recv()", which claims to "wait until the full requested
length is sent", which unfortunately is not correct. Instead, data
sent from the server has to be polled until everything is completely
transmitted (using the "Content-Length" field in the HTTP header).
src/libgame/http.c