summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2022-07-18 11:53:27 +0200
committerCarlos Garcia Campos <cgarcia@igalia.com>2022-08-12 12:18:56 +0200
commit1c9e8620754b68aa5520561ceb4fa2ce9516de63 (patch)
treebadedf6f7fe1f3ecd37b83ff2b9260fae591fea5 /tests
parent3ae802e6026a8c84637c1fde6a0ee88bd06a2056 (diff)
downloadlibsoup-1c9e8620754b68aa5520561ceb4fa2ce9516de63.tar.gz
server: make server clients be the connections and not the messages
Client list is now a list of connections, owned by the server. The connection creates the messages and notifies the server with request-started signal. The first message is created before the TLS handshake, and then request-started is emitted to allow the user to connect to accept-certificate signal on the message. If the connection is persistent, the next request-started signal will be emitted if there's an actual request from the client. This is a change in behavior, before we always emitted the request-started when waiting for a new request even if the request never actually started.
Diffstat (limited to 'tests')
-rw-r--r--tests/connection-test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/connection-test.c b/tests/connection-test.c
index 6b07d6bd..8a1ca7e5 100644
--- a/tests/connection-test.c
+++ b/tests/connection-test.c
@@ -58,9 +58,9 @@ timeout_socket (GObject *pollable,
}
static void
-timeout_request_started (SoupServer *server,
- SoupServerMessage *msg,
- gpointer user_data)
+timeout_request_finished (SoupServer *server,
+ SoupServerMessage *msg,
+ gpointer user_data)
{
SoupServerConnection *conn;
GMainContext *context = g_main_context_get_thread_default ();
@@ -68,7 +68,7 @@ timeout_request_started (SoupServer *server,
GInputStream *istream;
GSource *source;
- g_signal_handlers_disconnect_by_func (server, timeout_request_started, NULL);
+ g_signal_handlers_disconnect_by_func (server, timeout_request_finished, NULL);
conn = soup_server_message_get_connection (msg);
iostream = soup_server_connection_get_iostream (conn);
@@ -102,8 +102,8 @@ setup_timeout_persistent (SoupServer *server,
* 3. Close the socket.
*/
g_mutex_lock (&server_mutex);
- g_signal_connect (server, "request-started",
- G_CALLBACK (timeout_request_started), NULL);
+ g_signal_connect (server, "request-finished",
+ G_CALLBACK (timeout_request_finished), NULL);
}
static void