Skip to content

Commit 30d74d6

Browse files
vercingetorxPMunch
authored andcommitted
use uppercase "type" for Proxy-Authorization header (nim-lang#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
1 parent e730d20 commit 30d74d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pure/httpclient.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ proc generateHeaders(requestUrl: Uri, httpMethod: HttpMethod, headers: HttpHeade
523523
# Proxy auth header.
524524
if not proxy.isNil and proxy.auth != "":
525525
let auth = base64.encode(proxy.auth)
526-
add(result, "Proxy-Authorization: basic " & auth & httpNewLine)
526+
add(result, "Proxy-Authorization: Basic " & auth & httpNewLine)
527527

528528
for key, val in headers:
529529
add(result, key & ": " & val & httpNewLine)

0 commit comments

Comments
 (0)