Skip to content
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

use webflux WebClient build proxy request to apisix-controller ingress ,return 400 #11377

Open
wangjia5693 opened this issue Jun 27, 2024 · 0 comments

Comments

@wangjia5693
Copy link

Description

question:
use webflux WebClient build proxy request to apisix-controller ingress ,return 400

LOG:
"CONNECT apisix.ingress.com:80 HTTP/1.1" 400 229 0.031 "-" "-" - - - "://"

CODE:

HttpClient httpClient = HttpClient.create().proxy(proxy -> proxy.type(ProxyProvider.Proxy.HTTP).address(new InetSocketAddress("10.0.0.110", 31278)));
ReactorClientHttpConnector connector = new ReactorClientHttpConnector(httpClient);
WebClient build = WebClient.builder()
.clientConnector(connector).build();
Mono mono = build
.post()
.uri("http://apisix.ingress.com")
.contentType(MediaType.APPLICATION_JSON)
.bodyValue("ttt")
.retrieve()
.bodyToMono(String.class)
.doOnError(Exception.class, err -> {
log.error("发生错误={}" ,err.getMessage());
});

    mono.subscribe(ConsumerWrapper.of(result -> {}));
    ThreadUtil.safeSleep(3000);

Environment

  • APISIX version (run apisix version):
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant