if (!j)
puts("PASS");
+#if 0
/*
* _httpDigest()
*/
}
else
puts("PASS");
+#endif /* 0 */
/*
* httpGetHostname()
for (i = 1; i < argc; i ++)
{
+ int new_auth;
+
if (!strcmp(argv[i], "-o"))
{
i ++;
printf("Checking file \"%s\"...\n", resource);
+ new_auth = 0;
+
do
{
if (!_cups_strcasecmp(httpGetField(http, HTTP_FIELD_CONNECTION), "close"))
}
}
+ if (http->authstring && !strncmp(http->authstring, "Digest ", 7) && !new_auth)
+ _httpSetDigestAuthString(http, http->nextnonce, "HEAD", resource);
+
httpClearFields(http);
httpSetField(http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString(http));
httpSetField(http, HTTP_FIELD_ACCEPT_LANGUAGE, "en");
+
if (httpHead(http, resource))
{
if (httpReconnect2(http, 30000, NULL))
while ((status = httpUpdate(http)) == HTTP_STATUS_CONTINUE);
+ new_auth = 0;
+
if (status == HTTP_STATUS_UNAUTHORIZED)
{
/*
* See if we can do authentication...
*/
+ new_auth = 1;
+
if (cupsDoAuthentication(http, "HEAD", resource))
{
status = HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED;
printf("Requesting file \"%s\" (Accept-Encoding: %s)...\n", resource,
encoding ? encoding : "identity");
+ new_auth = 0;
+
do
{
if (!_cups_strcasecmp(httpGetField(http, HTTP_FIELD_CONNECTION), "close"))
}
}
+ if (http->authstring && !strncmp(http->authstring, "Digest ", 7) && !new_auth)
+ _httpSetDigestAuthString(http, http->nextnonce, "GET", resource);
+
httpClearFields(http);
httpSetField(http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString(http));
httpSetField(http, HTTP_FIELD_ACCEPT_LANGUAGE, "en");
while ((status = httpUpdate(http)) == HTTP_STATUS_CONTINUE);
+ new_auth = 0;
+
if (status == HTTP_STATUS_UNAUTHORIZED)
{
/*
* See if we can do authentication...
*/
+ new_auth = 1;
+
if (cupsDoAuthentication(http, "GET", resource))
{
status = HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED;