Source release 16.3.0

This commit is contained in:
John W. Bruce
2020-07-24 14:30:03 -07:00
parent b830b1d1fb
commit 160df9f57a
74 changed files with 4632 additions and 2561 deletions

View File

@@ -87,8 +87,8 @@ void UrlRequest::Reconnect() {
if (socket_.Connect(kConnectTimeoutMs)) {
is_connected_ = true;
} else {
LOGE("failed to connect to %s, port=%d", socket_.domain_name().c_str(),
socket_.port());
LOGE("Failed to connect: url = %s, port = %d, attempt = %u",
socket_.domain_name().c_str(), socket_.port(), i);
}
}
}
@@ -148,7 +148,7 @@ bool UrlRequest::PostRequestWithPath(const std::string& path,
// buffer to store length of data as a string
char data_size_buffer[32] = {0};
snprintf(data_size_buffer, sizeof(data_size_buffer), "%zd", data.size());
snprintf(data_size_buffer, sizeof(data_size_buffer), "%zu", data.size());
request.append("Content-Length: ");
request.append(data_size_buffer); // appends size of data
@@ -158,7 +158,8 @@ bool UrlRequest::PostRequestWithPath(const std::string& path,
request.append(data);
int ret = socket_.Write(request.c_str(), request.size(), kWriteTimeoutMs);
const int ret =
socket_.Write(request.c_str(), request.size(), kWriteTimeoutMs);
LOGV("HTTP request: (%d): %s", request.size(), b2a_hex(request).c_str());
return ret != -1;
}