aboutsummaryrefslogtreecommitdiff
path: root/io/channel-websock.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2017-10-10 13:28:03 +0100
committerDaniel P. Berrange <berrange@redhat.com>2017-10-16 16:57:08 +0100
commit0efd6c9ec19a1ea6c413424fbea54e1dfe471026 (patch)
treea632bafd6a29f8d09f741fccc389ff50b7dcd17c /io/channel-websock.c
parent6d5d23b00709510d55711661c7ca41408fd9934e (diff)
downloadqemu-0efd6c9ec19a1ea6c413424fbea54e1dfe471026.zip
qemu-0efd6c9ec19a1ea6c413424fbea54e1dfe471026.tar.gz
qemu-0efd6c9ec19a1ea6c413424fbea54e1dfe471026.tar.bz2
io: add trace points for websocket HTTP protocol headers
Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'io/channel-websock.c')
-rw-r--r--io/channel-websock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/io/channel-websock.c b/io/channel-websock.c
index 0354845..aa35ef3 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -224,6 +224,7 @@ qio_channel_websock_extract_headers(QIOChannelWebsock *ioc,
goto bad_request;
}
*nl = '\0';
+ trace_qio_channel_websock_http_greeting(ioc, buffer);
tmp = strchr(buffer, ' ');
if (!tmp) {
@@ -425,6 +426,9 @@ static void qio_channel_websock_handshake_process(QIOChannelWebsock *ioc,
goto bad_request;
}
+ trace_qio_channel_websock_http_request(ioc, protocols, version,
+ host, connection, upgrade, key);
+
if (!g_strrstr(protocols, QIO_CHANNEL_WEBSOCK_PROTOCOL_BINARY)) {
error_setg(errp, "No '%s' protocol is supported by client '%s'",
QIO_CHANNEL_WEBSOCK_PROTOCOL_BINARY, protocols);