]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix how ippeveprinter responds to an unsupported request character set.
authorMichael R Sweet <msweet@msweet.org>
Sat, 29 Jun 2024 12:44:12 +0000 (08:44 -0400)
committerMichael R Sweet <msweet@msweet.org>
Sat, 29 Jun 2024 12:44:12 +0000 (08:44 -0400)
CHANGES.md
tools/ippeveprinter.c

index 6a2f18139b99c8ecd649f3f9fd000560067acb0c..201ba6d84ea1b97ec7d9b77470f7773adf1e7aa1 100644 (file)
@@ -99,6 +99,7 @@ Changes in CUPS v2.5b1 (TBA)
 - Fixed TLS negotiation using OpenSSL with servers that require the TLS SNI
   extension.
 - Fixed error handling when reading a mixed `1setOf` attribute.
+- Fixed how `ippeveprinter` responds to an unsupported request character set.
 - Removed hash support for SHA2-512-224 and SHA2-512-256.
 - Removed `mantohtml` script for generating html pages (use
   `https://www.msweet.org/mantohtml/`)
index 0c2b2ce7e4d5cc8b49a73c4bc05c5b49a3a39bc5..f6777d9ae5c5a511554eaafcedeb54ccfce97f32 100644 (file)
@@ -5212,7 +5212,9 @@ process_ipp(ippeve_client_t *client)      // I - Client
       if (charset && strcasecmp(ippGetString(charset, 0, NULL), "us-ascii") && strcasecmp(ippGetString(charset, 0, NULL), "utf-8"))
       {
         // Bad character set...
-       respond_ipp(client, IPP_STATUS_ERROR_BAD_REQUEST, "Unsupported character set \"%s\".", ippGetString(charset, 0, NULL));
+       respond_ipp(client, IPP_STATUS_ERROR_CHARSET, "Unsupported character set '%s'.", ippGetString(charset, 0, NULL));
+       attr = ippCopyAttribute(client->response, charset, 0);
+        ippSetGroupTag(client->response, &attr, IPP_TAG_UNSUPPORTED_GROUP);
       }
       else if (!charset || !language || !uri)
       {