Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3931

user agent information missing during websocket request

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.0, 8.5.1.2
    • Fix Version/s: 8.5.2
    • Component/s: ZK Update Engine
    • Security Level: Jimmy
    • Environment:

      enable websockets

    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1, ZK 8.5.2 S2

      Description

      Steps to Reproduce

      enable websockets
      run the attachment ws-useragent-missing.zul
      click the button

      Current Result

      during an execution via websockets the user agent information is missing

      Expected Result

      useragent information should be available

      Workaround

      store the user agent information (related information) as a desktop scoped attribute (when the page loads) for later retrieval during websocket requests e.g using a DesktopInit listener

      public void init(Desktop desktop, Object request) {
        deskop.setAttribute("my.useragent", desktop.getExecution().getUserAgent());
        deskop.setAttribute("my.mobile", desktop.getExecution().getBrowser("mobile"));
      }
      

      And retrieve the same information later:

      String useragent = (String)Executions.getCurrent().getDesktop().getAttribute("my.useragent");
      String mobile = (String)Executions.getCurrent().getDesktop().getAttribute("my.mobile");
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wenninghsu wenninghsu
                Reporter:
                cor3000 cor3000
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: