-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[http-probe] Add HTTP headers to CONNECT requests #404
Comments
@matt-malarkey Thank you for reporting the issue and researching it. Off the top of my head, this sounds reasonable to me. I'll think more about it. |
Sorry for dropping the ball on this one, but I was looking at it again (yes, I know after a year :() and realized that connect headers will likely look very different from the general request headers. It will be better to add another field called |
#763 adds proxy_connect_headers field. |
Issue
When sending HTTPS requests with
http-probe
through a proxy, usingproxy_url
, user defined HTTP headers are not added to theCONNECT
request.This appears to be a limitation of https://pkg.go.dev/net/http where HTTP headers are only added to
CONNECT
requests if you specify them when creating theTransport
object.Fix
In
http.go:L457
we could add any specified HTTP headers also to theCONNECT
request like so:It seems fairly simple to implement this but I'm not sure if adding user defined headers also to the
CONNECT
request has any other implications.The text was updated successfully, but these errors were encountered: