Skip to content
  • Carlos Garcia Campos's avatar
    WebSockets: allow to send close frames with no body · e590c906
    Carlos Garcia Campos authored and Carlos Garcia Campos's avatar Carlos Garcia Campos committed
    Using the code SOUP_WEBSOCKET_CLOSE_NO_STATUS. The spec says that code
    should not be included in a frame, but that doesn't mean we can't use it
    on the API level to mean no status. We were using 0 internally which is
    not a valid code either. When an empty close frame is received we still
    reply with a SOUP_WEBSOCKET_CLOSE_NORMAL code frame, but we return
    SOUP_WEBSOCKET_CLOSE_NO_STATUS from
    soup_websocket_connection_get_close_code() because that's actually what
    we received.
    e590c906