compression option missencoded by library #2997

Closed
michaelrsweet opened this Issue Nov 12, 2008 · 3 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Nov 12, 2008

Version: 1.3-current
CUPS.org User: opher

To override the auto-typing of compressed (gzipped) documents one needs to specify these attributes

document-format=super/type
compression=gzip

Unfortunately the cups library missencodes 'compression' with
group_tag = IPP_TAG_JOB
value_tag = IPP_TAG_NAME
instead of:
group_tag = IPP_TAG_OPERATION
value_tag = IPP_TAG_KEYWORD

This was tested against CUPS 1.2.4 (RedHat 5.2), 1.2.12 and 1.3.9 (Fedora).

A proposed patch (untested) against 1.3-current is attached.

Collaborator

michaelrsweet commented Nov 13, 2008

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Nov 13, 2008

"compression.patch":

This patch file was generated by NetBeans IDE

Following Index: paths are relative to: H:\My Documents\NetBeansProjects\cups-1.3.x\cups

This patch can be applied using context Tools: Patch action on respective folder.

It uses platform neutral UTF-8 encoding and \n newlines.

Above lines and this line are ignored by the patching process.

Index: encode.c
--- encode.c Base (BASE)
+++ encode.c Locally Modified (Based On LOCAL)
@@ -51,6 +51,7 @@
{ 0, "brightness-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "columns", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "columns-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },

  • { 0, "compression", IPP_TAG_KEYWORD, IPP_TAG_OPERATION },
    { 0, "copies", IPP_TAG_INTEGER, IPP_TAG_JOB },
    { 0, "copies-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
    { 0, "document-format", IPP_TAG_MIMETYPE, IPP_TAG_OPERATION },
Collaborator

michaelrsweet commented Nov 13, 2008

"str2997.patch":

Index: cups/encode.c

--- cups/encode.c (revision 8118)
+++ cups/encode.c (working copy)
@@ -51,6 +51,7 @@
{ 0, "brightness-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "columns", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "columns-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },

  • { 0, "compression", IPP_TAG_KEYWORD, IPP_TAG_JOB },
    { 0, "copies", IPP_TAG_INTEGER, IPP_TAG_JOB },
    { 0, "copies-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
    { 0, "document-format", IPP_TAG_MIMETYPE, IPP_TAG_OPERATION },

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment