diff options
author | xioren <40043405+xioren@users.noreply.github.com> | 2021-12-19 05:01:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-19 13:01:17 +0000 |
commit | b812431f831748c9013a12074cc6a7a838b580cd (patch) | |
tree | 1ba07af8157ad06fe4458c79fba9da05187fca1a /lib | |
parent | 610516e02756dd1447fc807077bacf86eb75acdd (diff) | |
download | Nim-b812431f831748c9013a12074cc6a7a838b580cd.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/httpclient.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index 67ba8cf2b..7686d15bd 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -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) |