Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept queue keyword arg in Connection_getJobs #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guilhermgonzaga
Copy link

Hello.

This PR is based on the proposal #4, but I thought a better approach to it would be to use the string library rather than regex. Still, there are some technicalities to discuss.

First is queue name length. In the very unlikely case that the limit (998 bytes) is reached, trimming the queue name should be worse than failing, since it may still be a valid request, but not the intended one.

Second, I found that RFC 3986 section 3.3 specifies a few more valid characters in the path component, depending on the rule used. Since all IPP URIs are absolute (RFC 3510 section 4.1), the following should be valid:

Char Rule/Category
ALPHA unreserved
DIGIT unreserved
- unreserved
. unreserved
_ unreserved
~ unreserved
! sub-delims
$ sub-delims
& sub-delims
' sub-delims
( sub-delims
) sub-delims
* sub-delims
+ sub-delims
, sub-delims
; sub-delims
= sub-delims
:
@

I did create a few dummy printers in Ubuntu using all of those chars, except ', which lp rejected, and I was able to send jobs and query them with getJobs in Python.

Close #4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant