]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/client.c
Import CUPS v2.0.4
[thirdparty/cups.git] / scheduler / client.c
index 15abbe3f0d26e8848aff5a15d6962b54f4a24773..8c67272d42f8aa195288356d4b6cac51aefe6147 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c 12701 2015-06-08 18:33:44Z msweet $"
+ * "$Id: client.c 12754 2015-06-24 19:37:53Z msweet $"
  *
  * Client routines for the CUPS scheduler.
  *
@@ -2159,6 +2159,9 @@ cupsdSendError(cupsd_client_t *con,       /* I - Connection */
                http_status_t  code,    /* I - Error code */
               int            auth_type)/* I - Authentication type */
 {
+  char location[HTTP_MAX_VALUE];       /* Location field */
+
+
   cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cupsdSendError code=%d, auth_type=%d",
                 code, auth_type);
 
@@ -2191,8 +2194,12 @@ cupsdSendError(cupsd_client_t *con,      /* I - Connection */
   * never disable it in that case.
   */
 
+  strlcpy(location, httpGetField(con->http, HTTP_FIELD_LOCATION), sizeof(location));
+
   httpClearFields(con->http);
 
+  httpSetField(con->http, HTTP_FIELD_LOCATION, location);
+
   if (code >= HTTP_STATUS_BAD_REQUEST && con->type != CUPSD_AUTH_NEGOTIATE)
     httpSetKeepAlive(con->http, HTTP_KEEPALIVE_OFF);
 
@@ -4065,5 +4072,5 @@ write_pipe(cupsd_client_t *con)           /* I - Client connection */
 
 
 /*
- * End of "$Id: client.c 12701 2015-06-08 18:33:44Z msweet $".
+ * End of "$Id: client.c 12754 2015-06-24 19:37:53Z msweet $".
  */