io: cope with websock 'Connection' header having multiple values
commit6d5d23b00709510d55711661c7ca41408fd9934e
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 9 Oct 2017 16:52:28 +0000 (9 17:52 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 16 Oct 2017 15:57:08 +0000 (16 16:57 +0100)
treec417b0517d975a8635fbc4f7ffa6b15d32492d6e
parent8dfd5f96515ca20c4eb109cb0ee28e2bb32fc505
io: cope with websock 'Connection' header having multiple values

The noVNC server sends a header "Connection: keep-alive, Upgrade" which
fails our simple equality test. Split the header on ',', trim whitespace
and then check for 'upgrade' token.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
io/channel-websock.c