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

ver.4.5.6 HttpServerRequest.isExpectMultipart wrong results returned. #5166

Closed
bigtrouble opened this issue Mar 25, 2024 · 0 comments
Closed
Labels
Milestone

Comments

@bigtrouble
Copy link

Version

4.5.6

Context

public static void main(String[] args) {
    val vertx = Vertx.vertx();
    val server = vertx.createHttpServer(new HttpServerOptions());
    val router = Router.router(vertx);
    server.requestHandler(router);
    router.route()
      .handler(BodyHandler.create())
      .handler(ct -> {
        val req = ct.request();
        System.out.println("contentType:" + req.getHeader("content-type"));
        System.out.println("isExpectMultipart:" + req.isExpectMultipart());
        ct.response().end("ok");
      });

    server.listen(8080)
      .compose(t -> WebClient.create(vertx)
        .postAbs("http://127.0.0.1:8080")
        .sendMultipartForm(MultipartForm.create().attribute("a1", "11"))
        .mapEmpty()
      )
      .onComplete(ar -> {
        server.close();
        vertx.close();
      });
  }

The console returned the following results:

contentType:multipart/form-data; boundary=3dfbb691c889090f
isExpectMultipart:false

But in v4.5.5 the same test code isExpectMultipart returns true.

Extra

OS: windows11
JVM: 21.0.2
vertx: 4.5.5 & 4.5.6

@bigtrouble bigtrouble added the bug label Mar 25, 2024
@vietj vietj added this to the 4.5.7 milestone Mar 27, 2024
@vietj vietj closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants