]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix authorization (and other error) text from CGIs.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 16 Jul 2014 19:48:22 +0000 (19:48 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 16 Jul 2014 19:48:22 +0000 (19:48 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12037 a1ca3aef-8c08-0410-bb20-df032aa958be

scheduler/client.c

index f5150e5c5ba23dad87820fb5633494e8f3acde11..598df3c8aa76d7a9ff81f0de70e9bcb230fb276b 100644 (file)
@@ -2666,10 +2666,21 @@ cupsdWriteClient(cupsd_client_t *con)   /* I - Client connection */
 
             cupsdLogClient(con, CUPSD_LOG_DEBUG, "Sending status %d for CGI.", con->pipe_status);
 
-            if (!cupsdSendHeader(con, con->pipe_status, NULL, CUPSD_AUTH_NONE))
+            if (con->pipe_status == HTTP_STATUS_OK)
            {
-             cupsdCloseClient(con);
-             return;
+             if (!cupsdSendHeader(con, con->pipe_status, NULL, CUPSD_AUTH_NONE))
+             {
+               cupsdCloseClient(con);
+               return;
+             }
+           }
+           else
+           {
+             if (!cupsdSendError(con, con->pipe_status, CUPSD_AUTH_NONE))
+             {
+               cupsdCloseClient(con);
+               return;
+             }
            }
           }
          else