]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix redirection in the web interface (STR #4538)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 24 Jun 2015 18:22:32 +0000 (18:22 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 24 Jun 2015 18:22:32 +0000 (18:22 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12751 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
scheduler/client.c

index 464523702c5437b354261d8f611b176e99411a30..680c1077992da6517a16661a49fb70bd5f221b37 100644 (file)
@@ -4,6 +4,7 @@ CHANGES-2.0.txt
 CHANGES IN CUPS V2.0.4
 
        - Fixed a bug in cupsRasterWritePixels (STR #4650)
+       - Fixed redirection in the web interface (STR #4538)
 
 
 CHANGES IN CUPS V2.0.3
index 6721445415d050d10131debcca4018af3c87d34a..1221d2c8e976c9258d16c0b269f43659444e8ac7 100644 (file)
@@ -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);