Fix auth-scheme name for proxy authentication.

This commit is contained in:
levlam 2024-07-23 16:14:19 +03:00
parent 2c81189790
commit 97ded01095

View File

@ -25,7 +25,7 @@ void HttpProxy::send_connect() {
string proxy_authorization;
if (!username_.empty() || !password_.empty()) {
auto userinfo = PSTRING() << username_ << ':' << password_;
proxy_authorization = PSTRING() << "Proxy-Authorization: basic " << base64_encode(userinfo) << "\r\n";
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"