yarpc / yarpc-go

A message passing platform for Go
MIT License
401 stars 101 forks source link

http: fix outbound url template leaking schema across all the outbounds #2201

Closed jronak closed 1 year ago

jronak commented 1 year ago

HTTP outbounds use the shared defaultURLTemplate with schema set to HTTP. When a TLS outbound is created, it sets the schema to HTTPS in the URL template of the outbound. Since the URL templates are shared across outbounds, this schema for the outbound incorrectly is set to HTTPS. This diff fixes this bug by creating a copy of the URL template in the tls outbounds.

codecov[bot] commented 1 year ago

Codecov Report

Base: 85.32% // Head: 85.32% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (cb7a198) compared to base (e58c0b7). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2201 +/- ## ======================================= Coverage 85.32% 85.32% ======================================= Files 270 270 Lines 15471 15473 +2 ======================================= + Hits 13201 13203 +2 Misses 1847 1847 Partials 423 423 ``` | [Impacted Files](https://codecov.io/gh/yarpc/yarpc-go/pull/2201?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc) | Coverage Δ | | |---|---|---| | [transport/http/outbound.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2201?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L2h0dHAvb3V0Ym91bmQuZ28=) | `92.08% <100.00%> (+0.05%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.