CUPS_HTTP_DEFAULT (<rdar://problem/16762593>)
- The IPP backend did not abort a job when the printer did not validate
the supplied options (<rdar://problem/16836752>)
+ - Fixed an authentication race condition in cupsSendRequest (STR #4403)
CHANGES IN CUPS V1.7.2
got_status = 0;
while ((state = ippWrite(http, request)) != IPP_STATE_DATA)
- if (state == IPP_STATE_ERROR)
- break;
- else if (httpCheck(http))
+ {
+ if (httpCheck(http))
{
got_status = 1;
if (status >= HTTP_STATUS_MULTIPLE_CHOICES)
break;
}
+ else if (state == IPP_STATE_ERROR)
+ break;
+ }
if (state == IPP_STATE_ERROR)
{
- DEBUG_puts("1cupsSendRequest: Unable to send IPP request.");
+ /*
+ * We weren't able to send the IPP request. But did we already get a HTTP
+ * error status?
+ */
- http->status = HTTP_STATUS_ERROR;
- http->state = HTTP_STATE_WAITING;
+ if (!got_status || status < HTTP_STATUS_MULTIPLE_CHOICES)
+ {
+ /*
+ * No, something else went wrong.
+ */
- return (HTTP_STATUS_ERROR);
+ DEBUG_puts("1cupsSendRequest: Unable to send IPP request.");
+
+ http->status = HTTP_STATUS_ERROR;
+ http->state = HTTP_STATE_WAITING;
+
+ return (HTTP_STATUS_ERROR);
+ }
}
/*