keepalive connection closed when there're no listeners
spice-gtk uses multiplexing to connect webdav clients running in the virtual machine to the phodav server that is part of spice-gtk. Thus the clients are added using soup_server_accept_iostream()
and the soup server doesn't listen on any address.
In this setup, libsoup closes the connection after the request is finished, although the client set the keep-alive request header.
I did a quick debugging and the problem seem to be in the request_finished()
callback in soup-server.c
which contains the following condition:
if (completion == SOUP_MESSAGE_IO_COMPLETE &&
soup_socket_is_connected (sock) &&
soup_message_is_keepalive (msg) &&
priv->listeners) {
start_request (server, client);
} else {
soup_socket_disconnect (client->sock);
soup_client_context_unref (client);
}
The expression evaluates to false because of priv->listeners
being NULL
.