{"action":"opened","issue":{"url":"https://api.github.com/repos/vert-x3/vertx-web/issues/654","repository_url":"https://api.github.com/repos/vert-x3/vertx-web","labels_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/654/labels{/name}","comments_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/654/comments","events_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/654/events","html_url":"https://github.com/vert-x3/vertx-web/issues/654","id":240695737,"number":654,"title":"Async handler before SockJS handler results in \"Request has already been read\"","user":{"login":"bripkens","id":596443,"avatar_url":"https://avatars1.githubusercontent.com/u/596443?v=3","gravatar_id":"","url":"https://api.github.com/users/bripkens","html_url":"https://github.com/bripkens","followers_url":"https://api.github.com/users/bripkens/followers","following_url":"https://api.github.com/users/bripkens/following{/other_user}","gists_url":"https://api.github.com/users/bripkens/gists{/gist_id}","starred_url":"https://api.github.com/users/bripkens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bripkens/subscriptions","organizations_url":"https://api.github.com/users/bripkens/orgs","repos_url":"https://api.github.com/users/bripkens/repos","events_url":"https://api.github.com/users/bripkens/events{/privacy}","received_events_url":"https://api.github.com/users/bripkens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-05T15:49:52Z","updated_at":"2017-07-05T15:49:52Z","closed_at":null,"body":"### Version\r\n\r\n* vert.x web: 3.4.2\r\n\r\n### Context\r\n\r\nSockJS XHR transport tries to register a body handler (`rc.request().bodyHandler(buff -> {})`). This doesn't work when using an async handler before the SockJS handler. I tried adding a `BodyHandler` as the first handler, but unfortunately SockJS doesn't leverage this\r\n\r\n\r\n### Do you have a reproducer?\r\n\r\n```\r\nRouter router = Router.router(vertx);\r\n\r\nrouter.route().handler(this::doSomethingThatCallsNextAsynchronously);\r\n\r\nSockJSHandler sockJSHandler = SockJSHandler.create(vertx)\r\n    .socketHandler(socket -> {});\r\nrouter.route(\"/*\").handler(sockJSHandler);\r\n```\r\n\r\n### Steps to reproduce\r\n\r\n1. Connect to the server with an XHR transport.\r\n\r\n### Extra\r\n\r\nHow about registering an own bodyHandler an alternatively supporting `RoutingContent#getBody`?"}}
{"actor":{"display_login":"bripkens"}}