diff options
| author | levlam <levlam@telegram.org> | 2024-07-23 15:54:56 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2024-07-23 15:54:56 +0300 |
| commit | 2c81189790e5c21f82159a8afc04bb81f9135a5e (patch) | |
| tree | 4d92a7cfe4850b841a3780618b3ea2f95c0edf8e /tdnet | |
| parent | 88c2fd50e5856d48b2c576ca505051f937b5f955 (diff) | |
Improve HttpProxy logging.
Diffstat (limited to 'tdnet')
| -rw-r--r-- | tdnet/td/net/HttpProxy.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tdnet/td/net/HttpProxy.cpp b/tdnet/td/net/HttpProxy.cpp index 35f682185..9d8250ef3 100644 --- a/tdnet/td/net/HttpProxy.cpp +++ b/tdnet/td/net/HttpProxy.cpp @@ -26,6 +26,7 @@ void HttpProxy::send_connect() { if (!username_.empty() || !password_.empty()) { auto userinfo = PSTRING() << username_ << ':' << password_; proxy_authorization = PSTRING() << "Proxy-Authorization: basic " << base64_encode(userinfo) << "\r\n"; + VLOG(proxy) << "Use credentials to connect to proxy: " << proxy_authorization; } fd_.output_buffer().append(PSLICE() << "CONNECT " << host << " HTTP/1.1\r\n" << "Host: " << host << "\r\n" @@ -47,7 +48,7 @@ Status HttpProxy::wait_connect_response() { char buf[1024]; size_t len = min(sizeof(buf), it.size()); it.advance(len, MutableSlice{buf, sizeof(buf)}); - VLOG(proxy) << "Failed to connect: " << format::escaped(Slice(buf, len)); + VLOG(proxy) << "Failed to connect: " << format::escaped(begin) << format::escaped(Slice(buf, len)); return Status::Error(PSLICE() << "Failed to connect to " << ip_address_.get_ip_host() << ':' << ip_address_.get_port()); } |
