{"action":"created","issue":{"url":"https://api.github.com/repos/vert-x3/vertx-web/issues/775","repository_url":"https://api.github.com/repos/vert-x3/vertx-web","labels_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/775/labels{/name}","comments_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/775/comments","events_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/775/events","html_url":"https://github.com/vert-x3/vertx-web/issues/775","id":277869851,"number":775,"title":"Vert.x 3.5.0 Websocket / BodyHandler regression","user":{"login":"Jotschi","id":326605,"avatar_url":"https://avatars3.githubusercontent.com/u/326605?v=4","gravatar_id":"","url":"https://api.github.com/users/Jotschi","html_url":"https://github.com/Jotschi","followers_url":"https://api.github.com/users/Jotschi/followers","following_url":"https://api.github.com/users/Jotschi/following{/other_user}","gists_url":"https://api.github.com/users/Jotschi/gists{/gist_id}","starred_url":"https://api.github.com/users/Jotschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jotschi/subscriptions","organizations_url":"https://api.github.com/users/Jotschi/orgs","repos_url":"https://api.github.com/users/Jotschi/repos","events_url":"https://api.github.com/users/Jotschi/events{/privacy}","received_events_url":"https://api.github.com/users/Jotschi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-29T19:03:14Z","updated_at":"2017-12-04T22:51:48Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Version\r\n\r\n* Vert.x core: 3.5.0\r\n* Vert.x web: 3.5.0\r\n\r\n### Context\r\n\r\nI noticed that having a `BodyHandler` \"infront\" of a `SockJSHandler` route will cause connection issues to that endpoint. I was unable to establish an active connection between the client and server in that situation.\r\n\r\nI debugged the client calls:\r\nThe exception handler of the WebSocketStream is not invoked and no error is being logged. The client side or server side handlers are not called even once.\r\n\r\nhttps://github.com/eclipse/vert.x/blob/34ee9cceca329c78b2a12b6ba4e12055ff66be20/src/main/java/io/vertx/core/http/impl/ClientConnection.java#L135\r\n\r\nThe connection to the websocket is opened and the `WebSocketClientHandshakerFactory#handshake` is invoked. The Handshake listener indicates that the handshake was successful. \r\nAfter that I can't really provide much more information. \r\n\r\nThe `ChannelPipeline` before handler is not invoked and thus the actual wsConnect is never called.\r\n\r\nIf the `BodyHandler` is removed no issue occurs and the endpoint works as expected.\r\n\r\n### Do you have a reproducer?\r\n\r\nThe reproducer contains a server/client setup to recreate the issue. You can remove the `router.route().handler(BodyHandler.create());` line in order to see that the `BodyHandler` is in fact causing the issue. Vert.x 3.4.2 did not show this behaviour.\r\n\r\n* https://gist.github.com/Jotschi/56073d13b19cd72dbed1f6941b0f7cd5\r\n\r\n### Steps to reproduce\r\n\r\n1. Create a Vert.x server which has a `BodyHandler` \"infront\" of the `SockJSHandler` endpoint.\r\n2. Connect to the endpoint via the Vert.x client\r\n\r\nThe client callback will not be invoked.\r\n\r\n### Extra\r\n\r\nI'm not sure why having the BodyHandler in my route is in fact causing this issue. I have not investigated that.\r\n"},"comment":{"url":"https://api.github.com/repos/vert-x3/vertx-web/issues/comments/349133781","html_url":"https://github.com/vert-x3/vertx-web/issues/775#issuecomment-349133781","issue_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/775","id":349133781,"user":{"login":"malte-behrendt","id":23082361,"avatar_url":"https://avatars3.githubusercontent.com/u/23082361?v=4","gravatar_id":"","url":"https://api.github.com/users/malte-behrendt","html_url":"https://github.com/malte-behrendt","followers_url":"https://api.github.com/users/malte-behrendt/followers","following_url":"https://api.github.com/users/malte-behrendt/following{/other_user}","gists_url":"https://api.github.com/users/malte-behrendt/gists{/gist_id}","starred_url":"https://api.github.com/users/malte-behrendt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malte-behrendt/subscriptions","organizations_url":"https://api.github.com/users/malte-behrendt/orgs","repos_url":"https://api.github.com/users/malte-behrendt/repos","events_url":"https://api.github.com/users/malte-behrendt/events{/privacy}","received_events_url":"https://api.github.com/users/malte-behrendt/received_events","type":"User","site_admin":false},"created_at":"2017-12-04T22:51:48Z","updated_at":"2017-12-04T22:51:48Z","author_association":"NONE","body":"Thanks for sharing! I was stuck with this issue for a few hours. Moving the body handler setup after the SockJSHandler indeed solved the problem. "}}
{"actor":{"display_login":"malte-behrendt"}}