Uploaded image for project: 'Immutant'
  1. Immutant
  2. IMMUTANT-632

Can’t send 4xx/5xx to websocket requests

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.1.7
    • Fix Version/s: 2.1.8
    • Labels:
      None
    • Environment:

      MacOS X 10.11.6, JDK 1.8.0_102-b14, Clojure 1.8, Chrome 58.0.3029.110, Firefox 53.0.3, Safari 10.1.1

    • Steps to Reproduce:
      Hide

      1. Set up endpoint (compojure.core/GET "/api/ws" [] { :status 403 })
      2. Make a request new Websocket("ws://localhost:3000/api/ws")

      Expected: 403 is returned, onerror callback on websocket is triggered
      Actual: Websocket got opened and immediately closed. Only onopen and onclose are triggered

      Show
      1. Set up endpoint (compojure.core/GET "/api/ws" [] { :status 403 }) 2. Make a request new Websocket("ws://localhost:3000/api/ws") Expected: 403 is returned, onerror callback on websocket is triggered Actual: Websocket got opened and immediately closed. Only onopen and onclose are triggered

      Description

      Websocket requests should be able to return erroneous status codes so that browser code could detect when connection fails.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tonsky Nikita Prokopov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: