res_http_websocket: ensure control frames do not interfere with data
authorJeremy Lainé <jeremy.laine@m4x.org>
Wed, 23 Jan 2019 10:45:56 +0000 (11:45 +0100)
committerJeremy Lainé <jeremy.laine@m4x.org>
Wed, 23 Jan 2019 15:02:38 +0000 (09:02 -0600)
commit69e9fd63e12fcda3aa083e2e402cdfde6496ea6d
treeb030a83f95cd26ceb364fd6947913cfe1f575e0b
parent884aaa5f728c18a6d3a9524b7343f26c6c5ae809
res_http_websocket: ensure control frames do not interfere with data

Control frames (PING / PONG / CLOSE) can be received in the middle of a
fragmented message. In order to ensure they do not interfere with the
reassembly buffer, we exit early and do not return the payload to the
caller.

ASTERISK-28257 #close

Change-Id: Ia5367144fe08ac6141bba3309517a48ec7f013bc
res/res_http_websocket.c