Re: CUPS & IPP_TAG_EXTENSION

Michael Sweet <[email protected]> Fri, 22 Mar 2024 11:40:49 -0400
Newsgroups dev.linux.lists.printing-architecture
Message-ID <[email protected]>
Alexander,

> On Mar 22, 2024, at 5:06 AM, Alexander Pevzner <[email protected]> wrote:
> 
> Hi Everybody,
> 
> yet another question regarding IPP.
> 
> In RFC8010, it is stated that IPP_TAG_EXTENSION is encoded similarly to any other tag: starting with 1 byte of tag (0x7f), followed by the attribute name, and then the attribute value. However, the RFC specifies that the first 4 bytes of the value should be reserved to encode 4 bytes of an extended tag.

Wow, good catch!

> On the other hand, the CUPS implementation encodes 0x7f, followed by 4 bytes of the extended tag, and then the attribute name and value.
> 
> So, the question arises: which approach is correct, CUPS or the RFC?

The RFC.  CUPS is broken in this respect, but then there have never been any extended types in standards-track nor vendor implementations that I am aware of, which is probably why we've never had problems... :)

I've created issues to track the fixes:

    https://github.com/OpenPrinting/cups/issues/913
    https://github.com/OpenPrinting/libcups/issues/80

________________________
Michael Sweet