Just one thing :
In the Wiki page of the GTS Protocol, in the "Data" section, its written, for the footer :
Also, I tried to do that in PHP, but the game always disconnected. By the way, I did not obtain the correct footer for \x01\x00 return. I figured out that the response have to be encoded with CLASSIC base64, not urlsafe. That way, I got everything to work.
...if someone can confirm that in other languages, it's not the urlsafe base64_encode one, or correct in the wiki that wrong part, it would be kind.