]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix Upgrade header handling when there is no TLS support (Issue #775)
authorMichael R Sweet <msweet@msweet.org>
Fri, 5 Apr 2024 13:05:47 +0000 (09:05 -0400)
committerMichael R Sweet <msweet@msweet.org>
Fri, 5 Apr 2024 13:05:47 +0000 (09:05 -0400)
CHANGES.md
cups/request.c

index ea219084fbff373fbc24be9006751aed42b4c259..c3dd08ec9c9f405380284169003a7a622672d139 100644 (file)
@@ -17,7 +17,8 @@ Changes in CUPS v2.4.8 (TBA)
   (Issue #423)
 - Fixed printing of jobs with job name longer than 255 chars on older printers
   (Issue #644)
-- Really backport fix for Issue #742
+- Really backported fix for Issue #742
+- Fixed "Upgrade" header handling when there is no TLS support (Issue #775)
 - Fixed memory leak when unloading a job (Issue #813)
 - Fixed memory leak when creating color profiles (Issue #815)
 - Fixed crash in `scan_ps()` if incoming argument is NULL (Issue #831)
index 5baa512bb6e6b5ffbe9ece8ab175bad38d72299d..2ede4b309e220816cd99ad016c37108c3ea50835 100644 (file)
@@ -434,8 +434,6 @@ cupsGetResponse(http_t     *http,   /* I - Connection to server or @code CUPS_HTTP
       else
         http->status = HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED;
     }
-
-#ifdef HAVE_TLS
     else if (status == HTTP_STATUS_UPGRADE_REQUIRED)
     {
      /*
@@ -444,10 +442,14 @@ cupsGetResponse(http_t     *http, /* I - Connection to server or @code CUPS_HTTP
 
       DEBUG_puts("2cupsGetResponse: Need encryption...");
 
+#ifdef HAVE_TLS
       if (!httpReconnect2(http, 30000, NULL))
         httpEncryption(http, HTTP_ENCRYPTION_REQUIRED);
-    }
+
+#else
+      http->status = HTTP_STATUS_CUPS_PKI_ERROR;
 #endif /* HAVE_TLS */
+    }
   }
 
   if (response)