Skip to content

Commit

Permalink
Replace a Header.Get call with getHeaderCanonical
Browse files Browse the repository at this point in the history
This is the only one I see left, and this is one is in the hot path for
every request.
  • Loading branch information
mattrobenolt committed Feb 8, 2024
1 parent cc86f64 commit 57e0333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duplex_http_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 57e0333

Please sign in to comment.