diff options
Diffstat (limited to 'tests/proxy-test.c')
| -rw-r--r-- | tests/proxy-test.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/proxy-test.c b/tests/proxy-test.c index bc6fb2b8..1595c8f7 100644 --- a/tests/proxy-test.c +++ b/tests/proxy-test.c @@ -46,6 +46,24 @@ authenticate (SoupMessage *msg, SoupAuth *auth, gboolean retrying) { + if (soup_auth_is_for_proxy (auth)) { + char *uri; + int i; + gboolean found = FALSE; + + uri = g_strdup_printf ("http://%s:%u", soup_auth_get_host (auth), soup_auth_get_port (auth)); + for (i = 1; i < G_N_ELEMENTS (proxies) && !found; i++) { + if (strcmp (uri, proxies[i]) == 0) + found = TRUE; + } + g_assert_true (found); + } else { + SoupURI *uri = soup_message_get_uri (msg); + + g_assert_cmpstr (uri->host, ==, soup_auth_get_host (auth)); + g_assert_cmpuint (uri->port, ==, soup_auth_get_port (auth)); + } + if (!retrying) { soup_auth_authenticate (auth, "user1", "realm1"); |
