-
Notifications
You must be signed in to change notification settings - Fork 502
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
test: allow specifying HTTP protocol #822
Conversation
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #822 +/- ##
==========================================
- Coverage 38.17% 38.10% -0.07%
==========================================
Files 61 61
Lines 10412 10428 +16
==========================================
- Hits 3975 3974 -1
- Misses 6138 6154 +16
- Partials 299 300 +1 |
你好,在 |
@@ -152,6 +168,8 @@ func (d *DefaultRoundTripper) CaptureRoundTrip(request Request) (*CapturedReques | |||
} | |||
} | |||
|
|||
d.initProtocol(client, request.Protocol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里代码逻辑没有什么问题,在设置client.Transport时候根据是否http/http2 和 是否TLS请求条件,是否可以重构一下,这样整体代码看起来会清晰舒服一些。
@sjcsjc123 |
破案了。Higress 的插件默认是全局配置的。原来是这个插件要求 Content-Type 不为空。作为 SNI 相关的插件,这个设计挺神奇的。 |
@spacewander 这个插件是为了解决这个问题的:#449 所以全局配置。新版本从控制面逻辑解决这个问题了,这个插件作用不大了 |
原来如此 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
fixes #730
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews