From 925502b8ccc58ac4ee2e6d19f3038e2986b4edaf Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 18 Jan 2008 15:21:43 +0000 Subject: [PATCH] test SOUP_AUTH_DOMAIN_REMOVE_PATH * tests/server-auth-test.c: test SOUP_AUTH_DOMAIN_REMOVE_PATH svn path=/trunk/; revision=1050 --- ChangeLog | 4 ++++ tests/server-auth-test.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index be20442..9fe1ba3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-01-18 Dan Winship + * tests/server-auth-test.c: test SOUP_AUTH_DOMAIN_REMOVE_PATH + +2008-01-18 Dan Winship + * configure.in: require glib 2.15.3, not 2.15.0, since AM_PATH_GLIB_2_0 didn't know about gio until post-2.15.2. Pointed out by Matthew Barnes, #510216. diff --git a/tests/server-auth-test.c b/tests/server-auth-test.c index 0d188f1..eb438cc 100644 --- a/tests/server-auth-test.c +++ b/tests/server-auth-test.c @@ -206,6 +206,19 @@ do_auth_tests (SoupURI *base_uri) !preemptive_basic || !good_password, !preemptive_basic || !good_password, /* success? */ (use_basic || use_digest) && good_password); + + /* 5. No auth required again. (Makes sure that + * SOUP_AUTH_DOMAIN_REMOVE_PATH works.) + */ + do_test (n++, base_uri, "/Any/Not/foo", good_password, + /* request */ + use_basic, use_digest, + /* expected from client */ + preemptive_basic, FALSE, + /* expected from server */ + FALSE, FALSE, + /* success? */ + TRUE); } } @@ -319,6 +332,7 @@ main (int argc, char **argv) SOUP_AUTH_DOMAIN_REALM, "server-auth-test", SOUP_AUTH_DOMAIN_ADD_PATH, "/Basic", SOUP_AUTH_DOMAIN_ADD_PATH, "/Any", + SOUP_AUTH_DOMAIN_REMOVE_PATH, "/Any/Not", SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, basic_auth_callback, NULL); soup_server_add_auth_domain (server, auth_domain); @@ -327,6 +341,7 @@ main (int argc, char **argv) SOUP_AUTH_DOMAIN_REALM, "server-auth-test", SOUP_AUTH_DOMAIN_ADD_PATH, "/Digest", SOUP_AUTH_DOMAIN_ADD_PATH, "/Any", + SOUP_AUTH_DOMAIN_REMOVE_PATH, "/Any/Not", SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK, digest_auth_callback, NULL); soup_server_add_auth_domain (server, auth_domain); -- 2.7.4