forked from oerkki/voxelands
fix possible bug in http_request
This commit is contained in:
parent
ea4666487e
commit
723cbe3504
|
@ -534,10 +534,11 @@ std::string http_request(char* host, char* url, char* post, int port)
|
||||||
HTTPResponseHeaders headers;
|
HTTPResponseHeaders headers;
|
||||||
int s;
|
int s;
|
||||||
char buff[2048];
|
char buff[2048];
|
||||||
|
std::string h;
|
||||||
|
|
||||||
addr.setPort(port);
|
addr.setPort(port);
|
||||||
if (!host || !host[0]) {
|
if (!host || !host[0]) {
|
||||||
std::string h = g_settings->get("api_server");
|
h = g_settings->get("api_server");
|
||||||
if (h == "")
|
if (h == "")
|
||||||
return "";
|
return "";
|
||||||
host = (char*)h.c_str();
|
host = (char*)h.c_str();
|
||||||
|
|
Loading…
Reference in New Issue