const char * /* O - Device URI or @code NULL@ */
cupsBackendDeviceURI(char **argv) /* I - Command-line arguments */
{
- const char *device_uri; /* Device URI */
+ const char *device_uri, /* Device URI */
+ *auth_info_required; /* AUTH_INFO_REQUIRED env var */
_cups_globals_t *cg = _cupsGlobals(); /* Global info */
+ int options; /* Resolve options */
if ((device_uri = getenv("DEVICE_URI")) == NULL)
device_uri = argv[0];
}
+ options = _HTTP_RESOLVE_STDERR;
+ if ((auth_info_required = getenv("AUTH_INFO_REQUIRED")) != NULL &&
+ !strcmp(auth_info_required, "negotiate"))
+ options |= _HTTP_RESOLVE_FQDN;
+
return (_httpResolveURI(device_uri, cg->resolved_uri,
- sizeof(cg->resolved_uri), 1, NULL, NULL));
+ sizeof(cg->resolved_uri), options, NULL, NULL));
}