summaryrefslogtreecommitdiff
path: root/tests/auth-test.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-06-03 20:38:38 +0000
committerDan Winship <danw@src.gnome.org>2003-06-03 20:38:38 +0000
commit0c5f03a037b5dd4d6761b86e4e4160421f056aac (patch)
tree315b5295fa37211aaadd74c41f43f2f135a517c8 /tests/auth-test.c
parent514012912dad15272f0788c4ece31fe073f3a318 (diff)
downloadlibsoup-soup-refactoring.tar.gz
Push SoupContext into the background in preparation for itssoup-refactoring
eventual removal. * libsoup/soup-message.c (soup_message_new, soup_message_new_full): Take a SoupUri instead of a SoupContext (soup_message_set_uri): instead of set_context (redirect_handler): Use soup_message_set_uri (soup_message_get_context): gone * libsoup/soup-context.c (struct _SoupContext): Move this here. No one else needs to know. (soup_context_get): Gone (soup_context_from_uri): constify uri (get_proxy): moved here from soup-misc.c and made to return a SoupUri. (try_create_connection): Update for that. * libsoup/soup-private.h: Remove struct _SoupContext def * libsoup/soup-connection.c (soup_connection_new): constify uri * libsoup/soup-proxy-connection.c (soup_proxy_connection_new): constify uri arguments, remove SoupContext references * libsoup/soup-misc.c (soup_get_proxy): Gone * libsoup/soup-server-cgi.c (run_async): Use soup_message_set_uri, etc * libsoup/soup-server-tcp.c (read_headers_cb): Likewise * tests/*: update soup_message_new() calls
Diffstat (limited to 'tests/auth-test.c')
-rw-r--r--tests/auth-test.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auth-test.c b/tests/auth-test.c
index e0d18fd9..b184397e 100644
--- a/tests/auth-test.c
+++ b/tests/auth-test.c
@@ -174,7 +174,7 @@ handler (SoupMessage *msg, gpointer data)
int
main (int argc, char **argv)
{
- SoupContext *ctx;
+ SoupUri *uri;
SoupMessage *msg;
char *expected;
int i;
@@ -185,13 +185,13 @@ main (int argc, char **argv)
printf ("Test %d: %s\n", i + 1, tests[i].explanation);
printf (" GET %s\n", tests[i].url);
- ctx = soup_context_get (tests[i].url);
- if (!ctx) {
+ uri = soup_uri_new (tests[i].url);
+ if (!uri) {
fprintf (stderr, "auth-test: Could not parse URI\n");
exit (1);
}
- msg = soup_message_new (ctx, SOUP_METHOD_GET);
+ msg = soup_message_new (uri, SOUP_METHOD_GET);
expected = g_strdup (tests[i].expected);
soup_message_add_error_code_handler (
@@ -222,10 +222,9 @@ main (int argc, char **argv)
printf ("\n");
- g_object_unref (msg);
- /* We don't free ctx because if we did, we'd end up
- * discarding the cached auth info at the end of each
- * test.
+ /* We don't free msg because if we did, we'd end up
+ * freeing its SoupContext and therefore the SoupContext's
+ * SoupAuthContext.
*/
}