eclipse-vertx/vertx-http-proxy

It can not transfer POST Request in RoutingContext by Web Proxy

Dustone-JavaWeb opened this issue · 1 comments

Questions

I Have try to proxy a tcp server as Test, It connect the tcp server but transform nothing

baseRouter = Router.router(vertx);
        baseRouter.route().handler(CorsHandler.create("*").allowedMethods(allowedMethods).allowedHeaders(allowedHeaders).allowCredentials(true));
        baseRouter.route().handler(BodyHandler.create().setBodyLimit(1024 * 1024 * 200));
        baseRouter.get("/actuator/health").handler(this::healthCheck);
        baseRouter.route("/*").handler(context->{
           System.out.println(context.body().asJsonObject().encodePrettily());
           context.next();
        });
        baseRouter.route("/camera/applyVideoStream").handler(
                ProxyHandler.create(
                        HttpProxy.reverseProxy(
                                new ProxyOptions().setSupportWebSocket(true),
                                vertx.createHttpClient(new HttpClientOptions().setTrustAll(true))
                        ).origin(cameraPort, cameraHost))
        );
        baseRouter.route("/itworks/*").handler(
                ProxyHandler.create(
                        HttpProxy.reverseProxy(
                                new ProxyOptions().setSupportWebSocket(true),
                                vertx.createHttpClient(new HttpClientOptions().setTrustAll(true))
                        ).origin(cameraPort, cameraHost))
        );

Version

4.4.4

Context

I encountered an exception which looks suspicious while ...

Do you have a reproducer?

A reproducer is a simple project hosted on GitHub (or another forge supporting git clone operation) that has a build file that can be executed to reproduce the issue.

Reproducers are very helpful for contributors and will likely help them fixing your bug faster.

  • Link to github project/gist

Steps to reproduce

  1. ...
  2. ...
  3. ...
  4. ...

Extra

  • Anything that can be relevant such as OS version, JVM version

Sorry for the delay. Please reopen if you can provide a complete reproducer. Thank you