Closed somehowchris closed 2 years ago
Updated it to also remove Connection
Headers, just like in the golang one
Also added the Proxy-Connection
Header to the hop_header list https://cs.opensource.google/go/go/+/refs/tags/go1.18.1:src/net/http/httputil/reverseproxy.go;l=178
Well cloing all headers isn't really a huge overhead but again I see it as a performance loss as a) mem neads to be allocated as you clone and insert and b) cycles are spent to iterate over all headers which all iterate over the
HOP_HEADERS
array.So I know, duplicated code should be eliminated but in case of this I couldn't find another solution and looking at it, 2 times 3 lines of code really aint that much.