Skip to content

Conversation

@famarting
Copy link

I found a bug with vertx-http, in a case like this

    router.post("/hi/bug")
    	    .consumes("application/json")
	    .handler(BodyHandler.create())
            .handler(rc -> rc.response().end("Hi from router"));

my requests was getting stuck and never returned.
After further investigation I found that the class ResumingRouter https://github.com/quarkusio/quarkus/blob/master/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/ResumingRouter.java wasn't properly implemented and after the call to consumes(... the underliying router was returned instead of the ResumingRouter, this lead into the unexpected behaviour I described above but many other things could be affected.

I have a reproducer for this error here https://github.com/famartinrh/quarkus-with-vertx-web
It can be easily tested running
curl -v -H "Content-Type:application/json" -X POST localhost:8080/hi/bug -d "hello world"

This PR fixes the incorrected implementation of the delegation in the class ResumingRouter and adds some modifications to related tests to cover the usecase

Special thanks to my mate @juazugas for helping me with the troubleshooting

@stuartwdouglas stuartwdouglas merged commit 5b12ae9 into quarkusio:master Nov 7, 2019
@stuartwdouglas stuartwdouglas added this to the 1.1.0 milestone Nov 7, 2019
@gsmet gsmet removed the backport? label Nov 14, 2019
@gsmet gsmet modified the milestones: 1.1.0, 1.0.0.Final Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants