libsoup r1050 - in trunk: . tests



Author: danw
Date: Fri Jan 18 15:21:43 2008
New Revision: 1050
URL: http://svn.gnome.org/viewvc/libsoup?rev=1050&view=rev

Log:
	* tests/server-auth-test.c: test SOUP_AUTH_DOMAIN_REMOVE_PATH


Modified:
   trunk/ChangeLog
   trunk/tests/server-auth-test.c

Modified: trunk/tests/server-auth-test.c
==============================================================================
--- trunk/tests/server-auth-test.c	(original)
+++ trunk/tests/server-auth-test.c	Fri Jan 18 15:21:43 2008
@@ -206,6 +206,19 @@
 			 !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 @@
 		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 @@
 		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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]