Giter Club home page Giter Club logo

Comments (10)

wifiprintguy avatar wifiprintguy commented on July 17, 2024 1

RFC 2911 says that, not 2910. The problem is the citation. RFC 8011 (replaced RFC 2911) section 4.1.3 is where the citation lives:

The attributes within a group MUST be unique; if an attribute with
the same name occurs more than once, the group is malformed. Clients
MUST NOT submit such malformed requests, and Printers MUST NOT return
such malformed responses. If such a malformed request is submitted
to a Printer, the Printer MUST either (1) reject the request with the
’client-error-bad-request’ status-code (RECOMMENDED -- see
Appendix B.1.4.1) or (2) process the request normally after selecting
only one of the attribute instances, depending on implementation.
Which attribute is selected when there are duplicate attributes
depends on implementation. The IPP Printer MUST NOT use the values
from more than one such duplicate attribute instance.

from jipp.

gmuth avatar gmuth commented on July 17, 2024 1

Even the IPP reference implementation CUPS sometimes responds with duplicate attributes. So resilience for this issue is highly recommended. Adding the attribute again sounds okay to me.

from jipp.

nikitasius avatar nikitasius commented on July 17, 2024

Yep, but

The attributes within a group MUST be unique; if an attribute with
the same name occurs more than once, the group is malformed. Clients
MUST NOT submit such malformed requests, and Printers MUST NOT return
such malformed responses. If such a malformed request is submitted
to a Printer, the Printer MUST either (1) reject the request with the
'client-error-bad-request' status-code (RECOMMENDED -- see
Appendix B.1.4.1) or (2) process the request normally after selecting
only one of the attribute instances, depending on implementation.
Which attribute is selected when there are duplicate attributes
depends on implementation
. The IPP Printer MUST NOT use the values
from more than one such duplicate attribute instance.

Thats what i need:

(2) process the request normally after selecting
only one of the attribute instances, depending on implementation.
Which attribute is selected when there are duplicate attributes
depends on implementation

from jipp.

nikitasius avatar nikitasius commented on July 17, 2024

Agree.

Even the IPP reference implementation CUPS sometimes responds with duplicate attributes. So resilience for this issue is highly recommended. Adding the attribute again sounds okay to me.

Agree, i had to edit that lib and rebuild it to be able to use w/ cups correctly.

from jipp.

gmuth avatar gmuth commented on July 17, 2024

Alternatively you could use this CupsClient which supports already some additional CUPS operations (e.g. job subscriptions and printer setup)

from jipp.

nikitasius avatar nikitasius commented on July 17, 2024

No, this lib is fine. I made for me an IPP server using vert.x and this lib.
So the issue i described here i faced during debug.

from jipp.

gmuth avatar gmuth commented on July 17, 2024

So, how about contributing to the IPP community your IPP server?

from jipp.

nikitasius avatar nikitasius commented on July 17, 2024

So, how about contributing to the IPP community your IPP server?

i need to make it nice and remove shitcode from :)

thats for debug purposes. Works for win (spooler) & linux (cups), but i need to read more docs to make it nice and customisable.

The advantage to use vertx it's cause it's small, fast, reactive & IPP use simple http/https. So vertx is a core and it have simple flow (which use kind of my "lib" which use that lib).
Project is on Java (i don't code on kotlin).

from jipp.

HPNavjot avatar HPNavjot commented on July 17, 2024

Analyzed RFC8011 section 4.1.3
The attributes within a group MUST be unique; if an attribute with the same name occurs more than once, the group is malformed. Clients MUST NOT submit such malformed requests, and Printers MUST NOT return such malformed responses. If such a malformed request is submitted to a Printer, the Printer MUST either (1) reject the request with the 'client-error-bad-request' status-code (RECOMMENDED -- see [Appendix B.1.4.1](https://www.rfc-editor.org/rfc/rfc8011.html#appendix-B.1.4.1)) or (2) process the request normally after selecting only one of the attribute instances, depending on implementation. Which attribute is selected when there are duplicate attributes depends on implementation. The IPP Printer MUST NOT use the values from more than one such duplicate attribute #instance.

with above comments in consideration, we are reconsidering the logic.

from jipp.

HPSudip avatar HPSudip commented on July 17, 2024

This is taken care and available in the latest release. Hence closing.

from jipp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.