immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
2016-04-15T07:26:57.000288Z

@tcrawley: or anyone else seen this error?

io.undertow.websockets.core.WebSocketFrameCorruptedException: UT002015: Extensions not allowed but received rsv of 4
the browser client connects to my immutant websocket server but the connection keeps dropping with the above error. Undertow/web version 2.1.3

2016-04-15T07:31:27.000292Z

the upgrade negotiation happens OK, and then the channel on-close gets called with the above error.

2016-04-15T09:24:51.000293Z

some debugging in Undertow shows extensions are not supported. The browser sends a Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits header which I presume is causing the above problem. Any workarounds?

2016-04-15T09:50:16.000294Z

it works if I do not add the Sec-WebSocket-Extensions: permessage-deflate header in the response (this is custom code i added for adding this header, you might remember the earlier discussion @tcrawley). But we need to support this compression extension header. How do I go about it? I dont need the decompression impl, (my code does the deflating part). All i need is Undertow to allow this extension

2016-04-15T10:34:04.000295Z

all i need is for immutant (undertow) to allow accepting a message in which RSV bits are set (since it'll be compressed per the above header). and my code will take care of the decompression. Currently, Undertow flags such messages because no extensions are supported

2016-04-15T13:58:17.000296Z

or if there's a way to leverage the io.undertow.websockets.extensions.PerMessageDeflateHandshake, that'd be perfect. then i can get rid of the custom deflate code we use in the server @tcrawley

2016-04-15T16:41:06.000302Z

@moizsj: sorry, I've been neglecting slack. taking a look now

2016-04-15T16:46:40.000303Z

@moizsj: I don't see a way for you to set extensions with immutant as it is, but I think we could expose a way for you to pass extensions to immutant.web/run

2016-04-15T16:47:54.000304Z

or, we expose the WebSocketProtocolHandshakeHandler and you can add extensions to it directly

2016-04-15T17:38:07.000305Z

@tcrawley: thanks for that. I am fine with either approach. Whatever allows you to get it out quicker. How soon do you reckon you could have a build out?

2016-04-15T17:38:26.000306Z

testing something for you now :)

2016-04-15T17:38:34.000307Z

Awesome

2016-04-15T18:05:40.000309Z

@moizsj: once ^ builds, I'll have some sample code for you

2016-04-15T18:05:43.000310Z

and a build :)

2016-04-15T18:10:22.000311Z

Super @tcrawley So this is expected to be a stable version of wunderboss?

2016-04-15T18:13:07.000312Z

yes, it will rely on an incremental build, but the fix will make it into the next wunderboss (and therefore immutant) release

2016-04-15T18:14:14.000313Z

the relevant wunderboss change is: https://github.com/projectodd/wunderboss/commit/c989c1eaebf936213b4eaffb1d40a18e6338cd9d

2016-04-15T18:15:32.000315Z

@moizsj: if you use Immutant incremental build 726 (http://immutant.org/builds/2x/), you should be able to add extensions like so: https://gist.github.com/a82e004d0180cbc4db20c9f2f6bf7249

2016-04-15T18:24:12.000317Z

@tcrawley: checking it out..assuming this works, when will it make it to the next proper build?

2016-04-15T18:24:59.000318Z

it depends on when we do a release. we don't have one planned currently - this is the only real issue we've had filed against 2.1.3

2016-04-15T18:26:04.000319Z

do you have an organizational requirement that prevents using an incremental? or would you just be more comfortable with an official release?

2016-04-15T18:27:46.000320Z

mostly just about comfort, might not be a deal breaker but will have to check next week on that. btw, same dep should work for web right? [org.immutant/web "2.x.incremental.726"]

2016-04-15T18:28:38.000321Z

yes, as long as you have our incremental repo set:

2016-04-15T18:28:43.000322Z

:repositories [["Immutant incremental builds"
                  "<http://downloads.immutant.org/incremental/>"]]

2016-04-15T19:40:37.000323Z

@tcrawley: so it works! though still trying to root cause some intermittent disconnects. What would get me the eqivalent of permessage-deflate; client_no_context_takeover; server_no_context_takeover behaviour on the server?

2016-04-15T19:41:03.000324Z

yay!

2016-04-15T19:41:22.000325Z

I don't know - I don't know what those no_context_takeover options are

2016-04-15T19:43:59.000326Z

the code for PerMessageDeflateHandshake mentions that it supports those options

2016-04-15T19:57:37.000327Z

@tcrawley: though it works, almost after every message exchange between the server and client, there is a connection drop..

2016-04-15T19:58:03.000328Z

do you get an exception?

2016-04-15T19:59:08.000329Z

or a ws error code?

2016-04-15T20:05:10.000330Z

error code 1002 @tcrawley

2016-04-15T20:06:55.000331Z

no exceptions on the server-side?

2016-04-15T20:09:15.000332Z

or log messages? it looks like the PerMessageDeflateHandshake will log if it gets a parameter it doesn't recognize

2016-04-15T20:16:19.000333Z

no exceptions..and this is isnt consistently reproducible. I'll try to dig deeper into this next week. but regardless, you've been super helpful as always @tcrawley. when do you expect the 2.1.4 to be out?

2016-04-15T20:16:59.000334Z

we haven't scheduled it at all, since we don't really have any issues. but I'd be happy to put one out for you next week if you need it

2016-04-15T20:18:51.000335Z

that'd be great, will make it much easier for me to adopt it. hopefully i can come back to you on monday and confirm there are no issues with PerMessageDeflateHandshake, and then I'll request you for a 2.1.4. Have a nice weekend!

2016-04-15T20:19:04.000336Z

sounds good. you too!

2016-04-15T20:42:30.000337Z

@tcrawley: actually could i ask you to schedule the 2.1.4 anyway? since the fixes you made today are independent of the PerMessageDeflateHandshake code. And today's fixes most definitely look good, in that they allow you to customize the ws handler.

2016-04-15T20:46:04.000339Z

so that i have the 2.1.4 on monday which'll allow me to start working on my release