Bug ID 712362: ASM stalls WebSocket frames after legitimate websockets handshake with 101 status code, but without 'Switching Protocols' reason phrase

Last Modified: Sep 13, 2023

Affected Product(s):
BIG-IP ASM(all modules)

Known Affected Versions:
12.1.2, 12.1.3,,,,,, 13.1.0,,,,,,,, 14.0.0,,,,

Fixed In:

Opened: Mar 28, 2018

Severity: 3-Major


When the WebSocket HTTP handshake response comes without 'Switching Protocols' reason phrase at the first line, the ASM does not follow up WebSocket frames on the WebSocket's connection. The system posts the following messages in /ts/log/bd.log: -- IO_PLUGIN|ERR |Mar 28 09:16:15.121|30539|websocket.c:0269|101 Switching Protocols HTTP status arrived, but the websocket hanshake failed. -- IO_PLUGIN|ERR |Mar 28 09:16:15.121|30539|websocket.c:0270|Possible reasons are websocket profile isn't assigned on a virtual server or handshake is illegal.


WebSocket frames stalls.


-- ASM provisioned. -- ASM policy and WebSocket profile attached to a virtual server. -- WebSocket backend server sends 101 response without the 'Switching Protocols' phrase.


#1 Change the backend server: Change WebSocket backend server to return 101 response to include the 'Switching Protocols' reason phrase: HTTP/1.1 101 Switching Protocols #2 Use an irRule: when SERVER_CONNECTED { TCP::collect 15 } when SERVER_DATA { if { [TCP::payload 15] contains "HTTP/1.1 101 \r\n" } { TCP::payload replace 0 12 "HTTP/1.1 101 Switching Protocols" } }

Fix Information

This release correctly handles 101 responses even without the 'Switching Protocols' reason phrase.

Behavior Change

Guides & references

K10134038: F5 Bug Tracker Filter Names and Tips