Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Blog
  3. Firefox 11 websockets and FOP2

Firefox 11 websockets and FOP2

Scheduled Pinned Locked Moved Blog
3 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    N
    nicolas
    wrote on last edited by
    #1

    [h]Firefox 11 websockets and FOP2 [/h]

    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).

    [h]Firefox 11 and FOP2 over HTTPS[/h]

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

    [fixed]about:config [/fixed]

    After accepting the warning window, search for:

    [fixed]network.websocket.allowInsecureFromHTTPS [/fixed]

    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).

    [h]Other ways around the issue[/h]

    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:

    [fixed]var disableWebSocket = true;[/fixed]

    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:

    [fixed]about:config[/fixed]

    Accept the warning and search for:

    [fixed]network.websocket.enabled[/fixed]

    And set it to false.

    1 Reply Last reply
    0
    • E
      E
      emersonsens
      wrote on last edited by
      #2

      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?

      1 Reply Last reply
      0
      • N
        N
        nicolas
        wrote on last edited by
        #3

        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,

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups