1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Reduce indentation of HTTPFetchOngoing

Also clean up some related things.
This commit is contained in:
ShadowNinja 2014-09-14 20:46:45 -04:00
parent 18bfa1c785
commit 86a3c8ce56
8 changed files with 318 additions and 321 deletions

View file

@ -339,19 +339,14 @@ Json::Value getModstoreUrl(std::string url)
bool special_http_header = true;
try{
try {
special_http_header = g_settings->getBool("modstore_disable_special_http_header");
}
catch(SettingNotFoundException &e) {
}
} catch (SettingNotFoundException) {}
if (special_http_header) {
extra_headers.push_back("Accept: application/vnd.minetest.mmdb-v1+json");
return fetchJsonValue(url, &extra_headers);
}
else {
return fetchJsonValue(url, NULL);
}
return fetchJsonValue(url, special_http_header ? &extra_headers : NULL);
}
#endif