Skip to content

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