Firefox 11 websockets and FOP2

  1. 8 years ago

    admin

    3 Apr 2010 Administrator
    Edited 4 years ago by admin

    Firefox 11 websockets and FOP2

    Firefox 11 was released a couple of weeks ago. Now it includes html5 websockets support by default (previous versions had this feature disabled).

    Unfortunately, the websocket handshake that Firefox 11 uses has a little piece of information that prevents the FOP2 websocket connection from succeeding.

    This means that if you use Firefox 11, as is, it won't be able to connect with FOP2 versions 2.25 or prior.

    I had to quickly update the FOP2 server to accept this handshake and make Firefox 11 websocket feature functional. This was implemented in FOP2 version 2.26.

    So, if you upgrade FOP2 to version 2.26, you won' t have issues with Firefox 11, but with one exception: websocket connections are not going to be established by Firefox 11 if the http connection is done using ssl (https).

    Firefox 11 and FOP2 over HTTPS

    There is a setting you can set in Firefox to allow websocket connections over https links, you have to type in the address bar:

    about:config

    After accepting the warning window, search for:

    network.websocket.allowInsecureFromHTTPS

    And set it to true

    That will make websockets in Firefox 11 work even if the http connection is done via ssl. (You do not need to do this if you access the fop2 application using regular http connectios).

    Other ways around the issue

    The problem is in the websocket handshake, it is possible to make it work by disabling websockets, either in FOP2 or in Firefox itself.

    In FOP2, since version 2.24, you can disable websockets globally, you can edit the file /var/www/html/fop2/js/presence.js and in there set:

    var disableWebSocket = true;

    Then be sure to clear your firefox cache and you will not have issues with websockets again, as FOP2 will use the Flash xmlsockets connection instead.

    Alternatively, you can disable websockets support in Firefox, in the address bar go to:

    about:config

    Accept the warning and search for:

    network.websocket.enabled

    And set it to false.

  2. 2 years ago

    I fop2 to version 30.2.06 and 48.0.2 firefox, and disconnect occurs with other fop2 users to make my connection.
    There are some configuration to enable WebSocket connections over HTTPS links?

  3. admin

    23 Sep 2016 Administrator

    Websocket is enabled by default in FOP2, so you do not have to do anything to have it.

    If you use https, then you must be sure to configure related ssl_ entries in fop2.cfg matching whatever certificate and key files you have configure din your web server, for example:

    ssl_certificate_file=/etc/pki/tls/certs/localhost.crt
    ssl_certificate_key_file=/etc/pki/tls/private/localhost.key

    As for firefox, it might reject self signed certificates for secure websocket by default, problem is that it does it silently, with no option for you to accept the self signed certificate, you can overcome that by pointing firefox just once to https://your.server:4445, then it will let you accept the self signed certificate. After that try to log to FOP2 normally.

    Best regards,

or Sign Up to reply!