Source release 16.3.0
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user