From b84b000e790b5877934eaef3dcc87249d6b66f9d Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Thu, 8 Feb 2024 15:01:30 -0800 Subject: [PATCH] Replace a Header.Get call with getHeaderCanonical (#682) This is the only one I see left, and this is one is in the hot path for every request. --- duplex_http_call.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duplex_http_call.go b/duplex_http_call.go index 80f5f2e4..2cee4cf2 100644 --- a/duplex_http_call.go +++ b/duplex_http_call.go @@ -290,7 +290,7 @@ func (d *duplexHTTPCall) makeRequest() { defer close(d.responseReady) // Promote the header Host to the request object. - if host := d.request.Header.Get(headerHost); len(host) > 0 { + if host := getHeaderCanonical(d.request.Header, headerHost); len(host) > 0 { d.request.Host = host } if d.onRequestSend != nil {