Networking: don't enable HTTP compression if server doesn't support it

This commit is contained in:
Carter Li
2025-03-18 09:56:35 +08:00
parent 28bc97b92b
commit 3489cc8fe8
4 changed files with 44 additions and 29 deletions
+3
View File
@@ -19,7 +19,10 @@ void ffPreparePublicIp(FFPublicIpOptions* options)
state->ipv6 = options->ipv6;
if (options->url.length == 0)
{
state->compression = true;
*status = ffNetworkingSendHttpRequest(state, options->ipv6 ? "v6.ipinfo.io" : "ipinfo.io", "/json", NULL);
}
else
{
FF_STRBUF_AUTO_DESTROY host = ffStrbufCreateCopy(&options->url);