diff --git a/packages/network/lib/agent.ts b/packages/network/lib/agent.ts index fb65a1b57e1f..425c3605be24 100644 --- a/packages/network/lib/agent.ts +++ b/packages/network/lib/agent.ts @@ -38,7 +38,7 @@ export function buildConnectReqHead (hostname: string, port: string, proxy: url. connectReq.push(`Host: ${hostname}:${port}`) if (proxy.auth) { - connectReq.push(`Proxy-Authorization: basic ${Buffer.from(proxy.auth).toString('base64')}`) + connectReq.push(`Proxy-Authorization: Basic ${Buffer.from(proxy.auth).toString('base64')}`) } return connectReq.join(CRLF) + _.repeat(CRLF, 2) diff --git a/packages/network/test/unit/agent_spec.ts b/packages/network/test/unit/agent_spec.ts index 46c451a68b75..b047a23eebca 100644 --- a/packages/network/test/unit/agent_spec.ts +++ b/packages/network/test/unit/agent_spec.ts @@ -608,7 +608,7 @@ describe('lib/agent', function () { expect(head).to.eq([ 'CONNECT foo.bar:1234 HTTP/1.1', 'Host: foo.bar:1234', - 'Proxy-Authorization: basic YmF6OnF1dXg=', + 'Proxy-Authorization: Basic YmF6OnF1dXg=', '', '', ].join('\r\n')) })