use uppercase "type" for Proxy-Authorization header (#19273)

Some servers will reject authorization requests with a lowercase "basic" type. Changing to "Basic" seems to solve these issues.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization
This commit is contained in:
xioren
2021-12-19 05:01:17 -08:00
committed by GitHub
parent 610516e027
commit b812431f83

View File

@@ -523,7 +523,7 @@ proc generateHeaders(requestUrl: Uri, httpMethod: HttpMethod, headers: HttpHeade
# Proxy auth header.
if not proxy.isNil and proxy.auth != "":
let auth = base64.encode(proxy.auth)
add(result, "Proxy-Authorization: basic " & auth & httpNewLine)
add(result, "Proxy-Authorization: Basic " & auth & httpNewLine)
for key, val in headers:
add(result, key & ": " & val & httpNewLine)