diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-10-10 13:28:03 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-10-16 16:57:08 +0100 |
commit | 0efd6c9ec19a1ea6c413424fbea54e1dfe471026 (patch) | |
tree | a632bafd6a29f8d09f741fccc389ff50b7dcd17c /io/channel-websock.c | |
parent | 6d5d23b00709510d55711661c7ca41408fd9934e (diff) |
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/io/channel-websock.c b/io/channel-websock.c index 0354845e52..aa35ef3274 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); |