1 diff -ur cups-1.5.0/cups/auth.c cups-1.5.0-auth/cups/auth.c
2 --- cups-1.5.0/cups/auth.c 2011-05-20 20:22:33.000000000 +0200
3 +++ cups-1.5.0-auth/cups/auth.c 2011-08-05 19:39:19.587496832 +0200
6 DEBUG_printf(("1cupsDoAuthentication: Unknown auth type: \"%s\"",
7 http->fields[HTTP_FIELD_WWW_AUTHENTICATE]));
8 - http->status = HTTP_AUTHORIZATION_CANCELED;
13 DEBUG_printf(("1cupsDoAuthentication: authstring=\"%s\"", http->authstring));
14 diff -ur cups-1.5.0/cups/request.c cups-1.5.0-auth/cups/request.c
15 --- cups-1.5.0/cups/request.c 2011-05-20 05:49:49.000000000 +0200
16 +++ cups-1.5.0-auth/cups/request.c 2011-08-05 19:40:37.981496819 +0200
19 status = httpUpdate(http);
21 - while (status != HTTP_ERROR && http->state == HTTP_POST_RECV);
22 + while (http->state == HTTP_POST_RECV);
24 DEBUG_printf(("2cupsGetResponse: status=%d", status));
28 DEBUG_puts("2cupsGetResponse: Need authorization...");
30 - if (!cupsDoAuthentication(http, "POST", resource))
31 + if (cupsDoAuthentication(http, "POST", resource) >= 0)
34 status = HTTP_AUTHORIZATION_CANCELED;
38 case HTTP_UNAUTHORIZED :
39 - if (cupsDoAuthentication(http, "POST", resource))
40 + if (cupsDoAuthentication(http, "POST", resource) < 0)
41 return (HTTP_AUTHORIZATION_CANCELED);
43 if (httpReconnect(http))