diff options
Diffstat (limited to 'src/mods.cpp')
-rw-r--r-- | src/mods.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mods.cpp b/src/mods.cpp index b4e075b1e..7d6b4f5f7 100644 --- a/src/mods.cpp +++ b/src/mods.cpp @@ -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 |