bug: Twitter无法登录 报错restricted header name: "host"
xiao-wu-makes-herbal-tea opened this issue · 1 comments
xiao-wu-makes-herbal-tea commented
case "google":
authRequest = new AuthGoogleRequest(AuthConfig.builder()
.clientId("861445321239-97gn0s07f .googleusercontent.com")
.clientSecret("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")
.redirectUri("http://localhost:8443/oauth/callback/google")
.scopes(AuthScopeUtils.getScopes(AuthGoogleScope.USER_EMAIL, AuthGoogleScope.USER_PROFILE, AuthGoogleScope.USER_OPENID))
// 针对国外平台配置代理
.httpConfig(HttpConfig.builder()
.timeout(15000)
.proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 10080)))
.build())
.build());
Issue description
java.lang.IllegalArgumentException: restricted header name: "Host"
at java.net.http/jdk.internal.net.http.common.Utils.newIAE(Utils.java:286)
at java.net.http/jdk.internal.net.http.HttpRequestBuilderImpl.checkNameAndValue(HttpRequestBuilderImpl.java:110)
at java.net.http/jdk.internal.net.http.HttpRequestBuilderImpl.header(HttpRequestBuilderImpl.java:126)
at java.net.http/jdk.internal.net.http.HttpRequestBuilderImpl.header(HttpRequestBuilderImpl.java:43)
at com.xkcoding.http.util.MapUtil.forEach(MapUtil.java:77)
zhangyd-c commented
已修复,预计在 1.6.6 版本发布,请关注