Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: net/http/http_auth_handler_digest_unittest.cc

Issue 8863: Add some extra unit-tests to make sure we cover all permutations of {basic_au... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_handler_basic_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_digest_unittest.cc
===================================================================
--- net/http/http_auth_handler_digest_unittest.cc (revision 4108)
+++ net/http/http_auth_handler_digest_unittest.cc (working copy)
@@ -157,6 +157,48 @@
"qop=auth, nc=00000001, cnonce=\"082c875dcb2ca740\""
},
+ { // MD5 with no username.
+ "GET",
+ "/test/drealm1/",
+
+ // Challenge
+ "Digest realm=\"DRealm1\", "
+ "nonce=\"7thGplhaBAA=41fb92453c49799cf353c8cd0aabee02d61a98a8\", "
+ "algorithm=MD5, qop=\"auth\"",
+
+ "", "pass", // Username/password
+ "6509bc74daed8263", // cnonce
+ 1, // nc
+
+ // Authorization
+ "Digest username=\"\", realm=\"DRealm1\", "
+ "nonce=\"7thGplhaBAA=41fb92453c49799cf353c8cd0aabee02d61a98a8\", "
+ "uri=\"/test/drealm1/\", algorithm=MD5, "
+ "response=\"bc597110f41a62d07f8b70b6977fcb61\", "
+ "qop=auth, nc=00000001, cnonce=\"6509bc74daed8263\""
+ },
+
+ { // MD5 with no username and no password.
+ "GET",
+ "/test/drealm1/",
+
+ // Challenge
+ "Digest realm=\"DRealm1\", "
+ "nonce=\"s3MzvFhaBAA=4c520af5acd9d8d7ae26947529d18c8eae1e98f4\", "
+ "algorithm=MD5, qop=\"auth\"",
+
+ "", "", // Username/password
+ "1522e61005789929", // cnonce
+ 1, // nc
+
+ // Authorization
+ "Digest username=\"\", realm=\"DRealm1\", "
+ "nonce=\"s3MzvFhaBAA=4c520af5acd9d8d7ae26947529d18c8eae1e98f4\", "
+ "uri=\"/test/drealm1/\", algorithm=MD5, "
+ "response=\"22cfa2b30cb500a9591c6d55ec5590a8\", "
+ "qop=auth, nc=00000001, cnonce=\"1522e61005789929\""
+ },
+
{ // No algorithm, and no qop.
"GET",
"/",
« no previous file with comments | « net/http/http_auth_handler_basic_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698