Merge branch 'master' of github.com:john30/ebusd

This commit is contained in:
John
2023-05-29 17:32:04 +02:00
6 changed files with 23 additions and 7 deletions
+2
View File
@@ -446,6 +446,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") {
@@ -485,6 +486,7 @@ bool HttpClient::request(const string& method, const string& uri, const string&
}
}
}
#endif
pos = headers.find("\r\nContent-Length: ");
if (pos == string::npos) {
disconnect();