"job-state",
"job-state-reasons"
};
-static int job_canceled = 0;
+static int job_canceled = 0,
/* Job cancelled? */
+ uri_credentials = 0;
+ /* Credentials supplied in URI? */
static char username[256] = "",
/* Username for device URI */
*password = NULL;
*password++ = '\0';
cupsSetUser(username);
+ uri_credentials = 1;
}
else
{
(void)method;
(void)resource;
- /*
- * Remember that we need to authenticate...
- */
+ if (!uri_credentials)
+ {
+ /*
+ * Remember that we need to authenticate...
+ */
- auth_info_required = "username,password";
+ auth_info_required = "username,password";
- if (httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "username",
- def_username))
- {
- char quoted[HTTP_MAX_VALUE * 2 + 4];
- /* Quoted string */
+ if (httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "username",
+ def_username))
+ {
+ char quoted[HTTP_MAX_VALUE * 2 + 4];
+ /* Quoted string */
- fprintf(stderr, "ATTR: auth-info-default=%s,\n",
- quote_string(def_username, quoted, sizeof(quoted)));
+ fprintf(stderr, "ATTR: auth-info-default=%s,\n",
+ quote_string(def_username, quoted, sizeof(quoted)));
+ }
}
if (password && *password && *password_tries < 3)