summaryrefslogtreecommitdiff
path: root/tests/ntlm-test.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2015-03-05 12:22:22 -0500
committerDan Winship <danw@gnome.org>2015-03-05 12:22:22 -0500
commit78e74de238479c2cc316cf6f888c53ddd087b51b (patch)
tree40ef974c95400b9c17ac66d99db0887827d9c7d5 /tests/ntlm-test.c
parent5af4e2c80e09ac1cbcec484dcc9c42563baecd2c (diff)
downloadlibsoup-78e74de238479c2cc316cf6f888c53ddd087b51b.tar.gz
soup-auth-ntlm: always close connection after NTLM failure
SoupAuthNTLM can't recover from receiving a 401 on a previously authenticated connection. It was assuming that any such 401 would result in the connection being closed, but that's apparently sometimes not the case. Force it to get closed anyway in those cases. https://bugzilla.redhat.com/show_bug.cgi?id=1196765 https://bugzilla.gnome.org/show_bug.cgi?id=735197
Diffstat (limited to 'tests/ntlm-test.c')
-rw-r--r--tests/ntlm-test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ntlm-test.c b/tests/ntlm-test.c
index a0e02ab4..11d40c3a 100644
--- a/tests/ntlm-test.c
+++ b/tests/ntlm-test.c
@@ -456,12 +456,12 @@ do_ntlm_round (SoupURI *base_uri, gboolean use_ntlm,
SOUP_STATUS_UNAUTHORIZED);
/* 8. Server accepts Basic or NTLM from either user.
- * Alice-via-NTLM is still authenticated at this point from #6,
- * and Bob-via-NTLM is authenticated from #7, so neither
- * of them will do anything.
+ * NTLM users will try NTLM without getting a prompt (their
+ * previous NTLM connections will have been closed by the 401
+ * from /basic). Non-NTLM users will be prompted for either.
*/
do_message (session, base_uri, "/either",
- !use_ntlm, FALSE,
+ !use_ntlm, use_ntlm,
!use_ntlm, !use_ntlm && user != NULL,
user != NULL ? SOUP_STATUS_OK :
SOUP_STATUS_UNAUTHORIZED);