Skip to content

Exceptions when connecting to server over wrong protocol #6

@thomashub

Description

@thomashub

To reproduce: start the ChatServer example that comes with hookup. Connect (with, for example, http://www.websocket.org/echo.html) to wss://host:port, i.e. using the secure websocket protocol.

The server throws the following exception, after which it does not accept any new connections:

SEVERE: Exception during connection.
java.lang.IllegalArgumentException: empty text
    at org.jboss.netty.handler.codec.http.HttpVersion.<init>(HttpVersion.java:97)

When another client was already connected, it stays connected, but when it sends a message the server throws both the above error again, and also the following:

Mar 06, 2013 1:19:14 AM org.jboss.netty.channel.socket.nio.AbstractNioWorker
WARNING: Unexpected exception in the selector loop.
java.lang.IllegalArgumentException: unsupported message type: class org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame
    at org.jboss.netty.channel.socket.nio.SocketSendBufferPool.acquire(SocketSendBufferPool.java:53)

It seems to me that the wss:// connection attempt should be rejected if it cannot be handled, causing no issues for the future state of the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions