/* If a password is specified explicitly in the URI, use it
* even if the auth had previously already been authenticated.
*/
- if (uri->password) {
- if (!prior_auth_failed)
- soup_auth_authenticate (auth, uri->user, uri->password);
+ if (uri->password && uri->user) {
+ soup_auth_authenticate (auth, uri->user, uri->password);
+ soup_uri_set_password (uri, NULL);
+ soup_uri_set_user (uri, NULL);
} else if (!soup_auth_is_authenticated (auth) && can_interact) {
soup_auth_manager_emit_authenticate (manager, msg, auth,
prior_auth_failed);
"Digest/realm1/not/", "1", FALSE, /* should not be used */ "1", SOUP_STATUS_UNAUTHORIZED },
{ "Make sure we've forgotten it",
- "Digest/realm1/", "", FALSE, "0", SOUP_STATUS_UNAUTHORIZED }
+ "Digest/realm1/", "", FALSE, "0", SOUP_STATUS_UNAUTHORIZED },
+
+ { "Fail with URI-embedded password, then use right password in the authenticate signal",
+ "Basic/realm3/", "43", TRUE, "43", SOUP_STATUS_OK }
};
static const char *auths[] = {