fix(ops): VspNotifyClient 强制 HTTP/1.1,修复 h2c 升级导致 body 丢失
JDK 17 HttpClient 默认尝试 HTTP/2 升级(h2c),uvicorn 不支持 h2c
协商,处理 Upgrade 请求时丢弃 body,导致 Python 端收到空 {}。
强制 HTTP_1_1 禁用 h2c 升级。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ public class VspNotifyConfig {
|
||||
@Bean(value = "vspRestTemplate", defaultCandidate = false)
|
||||
public RestTemplate vspRestTemplate(VspNotifyProperties properties) {
|
||||
HttpClient httpClient = HttpClient.newBuilder()
|
||||
.version(HttpClient.Version.HTTP_1_1)
|
||||
.connectTimeout(Duration.ofMillis(properties.getConnectTimeout()))
|
||||
.build();
|
||||
JdkClientHttpRequestFactory factory = new JdkClientHttpRequestFactory(httpClient);
|
||||
|
||||
Reference in New Issue
Block a user