Request debug headers and log URL correctly

Merged from https://widevine-internal-review.googlesource.com/165861

We want debug headers to help diagnose b/186031735. I also
saw that we were only logging the domain name for some
errors instead of the full URL.

Bug: 186031735
Test: GtsMediaTestCases
Change-Id: I4d469a73e54f86d4d3b5d50bd0030fdb2a36df50
This commit is contained in:
Rahul Frias
2023-02-22 14:28:46 -08:00
parent ca79034a3d
commit c41b6cb713
3 changed files with 12 additions and 12 deletions

View File

@@ -328,14 +328,13 @@ bool HttpSocket::Connect(int timeout_in_ms) {
} else {
if (GetError() != ERROR_ASYNC_COMPLETE) {
// failed right away.
LOGE("cannot connect to %s, errno = %d", domain_name_.c_str(),
GetError());
LOGE("cannot connect to %s, errno = %d", url().c_str(), GetError());
CloseSocket();
return false;
} else {
// in progress. block until timeout expired or connection established.
if (!Wait(/* for_read */ false, timeout_in_ms)) {
LOGE("cannot connect to %s", domain_name_.c_str());
LOGE("cannot connect to %s", url().c_str());
CloseSocket();
return false;
}