improve compilability

This commit is contained in:
John
2023-05-18 13:24:03 +02:00
parent e606772e9d
commit 773a4dd661
6 changed files with 23 additions and 7 deletions
+2
View File
@@ -435,6 +435,7 @@ bool HttpClient::request(const string& method, const string& uri, const string&
string headers = result.substr(0, pos+2); // including final \r\n
const char* hdrs = headers.c_str();
*response = result.substr(pos+4);
#ifdef HAVE_TIME_H
if (time) {
pos = headers.find("\r\nLast-Modified: ");
if (pos != string::npos && headers.substr(pos+42, 4) == " GMT") {
@@ -474,6 +475,7 @@ bool HttpClient::request(const string& method, const string& uri, const string&
}
}
}
#endif
pos = headers.find("\r\nContent-Length: ");
if (pos == string::npos) {
disconnect();