Jason G. commented out XNIO-222 to see the spec about the content-lenght.
I found this:
https://tools.ietf.org/html/rfc7118
Each SIP message MUST be carried within a single WebSocket message,
and a WebSocket message MUST NOT contain more than one SIP message.
Because the WebSocket transport preserves message boundaries, the use
of the Content-Length header in SIP messages is not necessary when
they are transported using the WebSocket subprotocol.
This simplifies the parsing of SIP messages for both clients and
servers. There is no need to establish message boundaries using
Content-Length headers between messages. Other SIP transports,
such as UDP and the Stream Control Transmission Protocol (SCTP)
[RFC4168], also provide this benefit.
It was fixed, so the previous problem it is not present anymore:
This was replaced:
335 private void handleUpgrade(final HttpUpgradeParser parser) {
336 final String contentLength =
parser.getHeaders().get("content-length");
337 if (!"0".equals(contentLength)) {
338 future.setException(new IOException("For now upgrade responses
must have a content length of zero."));
339 return;
340 }
by that:
private void handleUpgrade(final HttpUpgradeParser parser) {
Map<String, String> simpleHeaders = new HashMap<>();
for(Map.Entry<String, List<String>> e :
parser.getHeaders().entrySet()) {
simpleHeaders.put(e.getKey(), e.getValue().get(0));
}
final String contentLength = simpleHeaders.get("content-length");
if (contentLength != null) {
if (!"0".equals(contentLength)) {
future.setException(new IOException("Upgrade responses must have
a content length of zero."));
return;
}
}
Seems to me that the content length should not be informed in your case, or if it is in
the header the value should be 0 to the upgrade operation.
Thx
Eduardo Sant'Ana da Silva
On Nov 24, 2015, at 10:34 PM, Thomas Frühbeck <fruehbeck(a)aon.at> wrote:
you nailed it, thanks!
unfortunate though :-/
Am 25.11.2015 um 01:30 schrieb Eduardo Sant´Ana da Silva:
> Maybe this could help:
>
>
https://issues.jboss.org/browse/XNIO-222
>
>
> 2015-11-24 20:33 GMT-02:00 Thomas Frühbeck <fruehbeck(a)aon.at>:
> Hi,
> I wanted to experiment with Wildfly 10.0.0.CR4 and Remoting and got the
> followin error on client side. I know, that my client works perfectly
> with 9.0.2.Final.
> Can you guide me to the relevant changes, is this a known problem?
>
> WARN: Could not register a EJB receiver for connection to localhost:8080
> java.lang.RuntimeException: java.io.IOException: For now upgrade
> responses must have a content length of zero.
> at
> org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:92)
> at
> org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:77)
> at
>
org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)
> at
>
org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:155)
> at
>
org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:115)
> at
>
org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:47)
> at
> org.jboss.ejb.client.EJBClientContext.getCurrent(EJBClientContext.java:271)
> at
> org.jboss.ejb.client.EJBClientContext.requireCurrent(EJBClientContext.java:281)
> at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:200)
> at
>
org.jboss.ejb.client.naming.ejb.EjbNamingContext.doCreateProxy(EjbNamingContext.java:216)
> at
>
org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:193)
> at
> org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:176)
> at javax.naming.InitialContext.lookup(InitialContext.java:417)
>
> Thanks,
> Thomas
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
>
>
> --
> __________________________
> Eduardo Sant'Ana da Silva - Dr.
> Pesquisador / Consultor de TI
>