qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/7] Update websocket code to more fully support the RFC
@ 2017-09-12 15:21 Brandon Carpenter
  2017-09-12 15:21 ` [Qemu-devel] [PATCH v3 1/7] io: Always remove an old channel watch before adding a new one Brandon Carpenter
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Brandon Carpenter @ 2017-09-12 15:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: berrange, brandon.carpenter

We've been experiencing issues where the qemu websocket server closes
connections from noVNC clients for no apparent reason. Debugging shows
that certain web browsers are injecting ping and pong frames when the
connection becomes idle. Some browsers send those frames without a
payload, which also is causing closure. This patch series addresses
these issues by making the websocket server more conformant to RFC
6455 - The WebSocket Protocol.

Remembering the opcode is sufficient for handling fragmented frames from
the client, which may be introduced by an intermediary server/proxy.
Respond to pings and ignore pongs rather than close the connection as
many browsers use ping/pong to test an idle connection. Close
connections according to the RFC, including providing a reason code and
message to aid debugging of unexpected disconnects. Empty payloads
should not cause a disconnect.

While updating the websocket code, several other bugs were discovered
for which patches are also included early in the set.

Brandon Carpenter (7):
  io: Always remove an old channel watch before adding a new one
  io: Small updates in preparation for websocket changes
  io: Add support for fragmented websocket binary frames
  io: Allow empty websocket payload
  io: Ignore websocket PING and PONG frames
  io: Reply to ping frames
  io: Attempt to send websocket close messages to client

 include/io/channel-websock.h |   2 +
 io/channel-websock.c         | 282 +++++++++++++++++++++++++++----------------
 ui/vnc-auth-vencrypt.c       |   3 +
 ui/vnc-ws.c                  |   6 +
 ui/vnc.c                     |   4 +
 5 files changed, 194 insertions(+), 103 deletions(-)

-- 
2.14.1


-- 


CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is 
for the sole use of the intended recipient(s) and may contain proprietary, 
confidential or privileged information or otherwise be protected by law. 
Any unauthorized review, use, disclosure or distribution is prohibited. If 
you are not the intended recipient, please notify the sender and destroy 
all copies and the original message.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-09-21 15:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-12 15:21 [Qemu-devel] [PATCH v3 0/7] Update websocket code to more fully support the RFC Brandon Carpenter
2017-09-12 15:21 ` [Qemu-devel] [PATCH v3 1/7] io: Always remove an old channel watch before adding a new one Brandon Carpenter
2017-09-12 15:21 ` [Qemu-devel] [PATCH v3 2/7] io: Small updates in preparation for websocket changes Brandon Carpenter
2017-09-12 15:21 ` [Qemu-devel] [PATCH v3 3/7] io: Add support for fragmented websocket binary frames Brandon Carpenter
2017-09-12 15:21 ` [Qemu-devel] [PATCH v3 4/7] io: Allow empty websocket payload Brandon Carpenter
2017-09-12 15:21 ` [Qemu-devel] [PATCH v3 5/7] io: Ignore websocket PING and PONG frames Brandon Carpenter
2017-09-12 15:21 ` [Qemu-devel] [PATCH v3 6/7] io: Reply to ping frames Brandon Carpenter
2017-09-12 15:21 ` [Qemu-devel] [PATCH v3 7/7] io: Attempt to send websocket close messages to client Brandon Carpenter
2017-09-18 14:48 ` [Qemu-devel] [PATCH v3 0/7] Update websocket code to more fully support the RFC Stefan Hajnoczi
2017-09-20 16:56 ` Brandon Carpenter
2017-09-21  9:55   ` Daniel P. Berrange
2017-09-21 15:54     ` Brandon Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).