[cups.development] ipptool use with Secure IPP

Michael Sweet msweet at apple.com
Tue Mar 27 14:01:02 PDT 2012


Kevin,

On Mar 27, 2012, at 1:00 PM, Kevin McVey wrote:
> ...
> I'm having some trouble, however, when validating these credentials from the printer side. It seems like the ipptool first attempts to connect to the printer without the specified credentials, hoping that they are not necessary.

Actually no, the issue is that IPP is layered over HTTP which provides the authentication framework.  HTTP authentication is challenge-based, so if you actually support authentication then you need to respond with a 401 Unauthorized HTTP status.  Then ipptool will retry the request and include the credentials.

See RFC 2616 and 2617 for details on how this all works; CUPS sends the "Expect: 100-continue" header with all requests and waits up to 1 second for a response before sending the remainder of the request, which gives the printer/server time to respond with a 401, 403, 426, etc.

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups-devel mailing list