netty, haproxy, websockets v76

Olivier ROLAND olivier.roland at laposte.net
Tue Jun 28 09:07:45 EDT 2011


Netty wait to receive the 8 bytes, it's hard coded.

    private static int getWebSocketContentLength(HttpMessage message) {
        // WebSockset messages have constant content-lengths.
        if (message instanceof HttpRequest) {
            HttpRequest req = (HttpRequest) message;
            if (HttpMethod.GET.equals(req.getMethod()) &&
                req.containsHeader(Names.SEC_WEBSOCKET_KEY1) &&
                req.containsHeader(Names.SEC_WEBSOCKET_KEY2)) {
                return 8;
            }

That's why workingRequest work and not notWorkingRequest.
I really don't know how to deal with this scary spec.

Le 27 juin 2011 à 22:14, Marc Hämmerle a écrit :

> Hope this helps. Just try with either "workingRequest" or "notWorkingRequest" to see that in the latter case the handler for received messages will not be called.
> 
> https://gist.github.com/1049708
> 
> <script src="https://gist.github.com/1049708.js?file=gistfile1.scala"></script>
> 
> Am 27.06.2011 um 15:57 schrieb 이희승 (Trustin Lee):
> 
>> Sure.  Please go ahead.  I haven't checked the issue yet though.
>> _______________________________________________
>> netty-users mailing list
>> netty-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-users
> 
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110628/6e70bfeb/attachment.html 


More information about the netty-users mailing list