]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Make sure we send a 0-length chunk for CGI output, even for things like "Status".
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 3 Jul 2014 19:15:31 +0000 (19:15 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 3 Jul 2014 19:15:31 +0000 (19:15 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11999 a1ca3aef-8c08-0410-bb20-df032aa958be

scheduler/client.c

index 73617eb709a562b34fd7d86e7ed4093d1796010a..d7491cbbde202f06a136ea34a96d77dc62e67e94 100644 (file)
@@ -2292,6 +2292,8 @@ cupsdSendHeader(
   char         auth_str[1024];         /* Authorization string */
 
 
+  cupsdLogClient(con, CUPSD_LOG_DEBUG, "cupsdSendHeader: code=%d, type=\"%s\", auth_type=%d", code, type, auth_type);
+
  /*
   * Send the HTTP status header...
   */
@@ -2662,6 +2664,8 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
                !httpGetField(con->http, HTTP_FIELD_CONTENT_LENGTH)[0])
              httpSetLength(con->http, 0);
 
+            cupsdLogClient(con, CUPSD_LOG_DEBUG, "Sending status %d for CGI.", con->pipe_status);
+
             if (!cupsdSendHeader(con, con->pipe_status, NULL, CUPSD_AUTH_NONE))
            {
              cupsdCloseClient(con);
@@ -2713,7 +2717,7 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
     {
       cupsdLogRequest(con, HTTP_STATUS_OK);
 
-      if (httpIsChunked(con->http) && (!con->pipe_pid || con->sent_header == 1))
+      if (httpIsChunked(con->http) && (!con->pipe_pid || con->sent_header > 0))
       {
         cupsdLogClient(con, CUPSD_LOG_DEBUG, "Sending 0-length chunk.");