attachment-0001

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Oct 9, 2009, at 12:15 AM, Tom Hastings wrote:</div><blockquote type="cite"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Monaco;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;
        font-weight:normal;
        font-style:normal;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:#993366;
        font-weight:normal;
        font-style:normal;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>



<div lang="EN-US" link="blue" vlink="purple" style="word-wrap: break-word;
-webkit-nbsp-mode: space;-webkit-line-break: after-white-space">

<div class="Section1"><p class="MsoNormal"><font size="2" color="#993366" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#993366">One small nit:<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="#993366" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#993366"><o:p>&nbsp;</o:p></span></font></p><p class="MsoNormal"><font size="2" color="#993366" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#993366">Michael wrote:<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="#993366" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#993366"><o:p>&nbsp;</o:p></span></font></p><p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">That said, we should only include the job-ids
attribute in the response if it was supplied in the request, since otherwise we
are only canceling jobs that can be canceled at that moment.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="#993366" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#993366"><o:p>&nbsp;</o:p></span></font></p><p class="MsoNormal"><font size="2" color="#993366" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#993366">However, if the
unprivileged user supplies Cancel-Job with neither “job-ids” and “my-jobs”
(or “my-jobs” = ‘false’), i.e., cancel all jobs that are
in a cancelable state, and there are jobs that are ‘pending’, ‘pending-held’,
‘processing’ that don’t belong to the user, so that the
Printer MUST reject the Cancel-Jobs with client-error-not-authorized, why
shouldn’t the Printer also return the list of “job-id” values
of these jobs that didn’t belong to the user?</span></font></p></div></div></o:smarttagtype></blockquote><div><br></div><div>Two reasons: first, historically we have only returned unsupported attributes for attributes that were provided in a request.</div><div><br></div><div>Second, because the client lacks the context information for a particular job-ids value. Consider the following situation:</div><div><br></div><div>1. User foo submits job 123.</div><div>2. User bar does a Cancel-Jobs operation with no additional attributes</div><div>3. Cancel-Jobs returns client-error-not-authorized with job-ids=123</div><div>4. Job 123 completes and its history is aged out</div><div>5. User bar does a Get-Job-Attributes request to inspect job 123, which fails with client-error-not-found.</div><div><br></div><div>There is also the case where local security policies do not allow user bar to see (or get) user foo's job objects, so in that case the job-ids values are not usable even when the job object is still around.</div><div><br></div><div>However, when the client provides a job-ids attribute, it must have already gotten a list of valid job IDs (presumably with Get-Jobs) and so it has the context for the jobs it is canceling.</div><div><br></div><div><br></div></div><div><blockquote type="cite"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><div lang="EN-US" link="blue" vlink="purple" style="word-wrap: break-word;
-webkit-nbsp-mode: space;-webkit-line-break: after-white-space"><div class="Section1"><p class="MsoNormal"><font size="2" color="#993366" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#993366"><o:p>&nbsp;</o:p></span></font></p><p class="MsoNormal"><font size="2" color="#993366" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#993366"><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">

<hr size="2" width="100%" align="center" tabindex="-1">

</span></font></div><p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> Michael Sweet
[mailto:msweet@apple.com] <br>
<b><span style="font-weight:bold">Sent:</span></b> Thursday, October 08, 2009
16:57<br>
<b><span style="font-weight:bold">To:</span></b> <st1:personname w:st="on"><a href="mailto:tom.hastings@alum.mit.edu">tom.hastings@alum.mit.edu</a></st1:personname><br>
<b><span style="font-weight:bold">Cc:</span></b> <a href="mailto:ipp@pwg.org">ipp@pwg.org</a><br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [IPP] ISSUE: on
Cancel-Jobs: what if some jobs are in cancelable state and some are not?</span></font><o:p></o:p></p>

</div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>

<div>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">On Oct 8, 2009, at 4:43 PM, Tom Hastings wrote:<o:p></o:p></span></font></p>

</div>

<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt" type="cite"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName">

<div link="blue" vlink="purple" style="word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space"><p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue">I think we have agreement.&nbsp; Since the
Cancel-Jobs is now all or nothing, the Printer MUST return an error code if any
of the jobs could NOT be canceled, even if all the rest could be.&nbsp; <u1:p></u1:p></span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue">So if any are not the user’s, then
return:</span></font><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"> </span></font><a name="_Toc518405512"><span style="layout-grid-mode:line">client-error-not-authorized (0x0403)</span></a><u1:p></u1:p><o:p></o:p></p><p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue">But if all are the user’s, but some
are not in a state to be canceled, return: </span></font><a name="_Toc518405513"><span style="layout-grid-mode:line">client-error-not-possible (0x0404)</span></a><u1:p></u1:p><o:p></o:p></p><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><u1:p>&nbsp;</u1:p><o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue">If the user requests “my-jobs”
= ‘true’, but there are no jobs that can be canceled, return: </span></font><a name="_Toc518405515"><span style="layout-grid-mode:line">client-error-not-found
(0x0406)</span></a><o:p></o:p></p>

<u1:p></u1:p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial;layout-grid-mode:line"><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue;layout-grid-mode:line">If the user omits
“job-ids” and omits “my-jobs” (or supplies the default
“my-jobs” = ‘false’), return: </span></font><span style="layout-grid-mode:line">client-error-not-authorized (0x0403)</span><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:blue;layout-grid-mode:line">.&nbsp; But what if the only jobs that are
cancelable are the user’s?&nbsp; That could successfully cancel all jobs
as long as they all belonged to the user.&nbsp; An implementation could to this
easily, by simply checking each job that is cancelable and as soon as it finds
one that doesn’t belong to the requesting user, it stops checking and
returns the </span></font><span style="layout-grid-mode:line">client-error-not-authorized
(0x0403)</span><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;
font-family:Arial;color:blue;layout-grid-mode:line">; if all jobs belong to the
user, it cancels all of them and returns: </span></font><a name="_Toc518405504"><span style="layout-grid-mode:line">successful-ok (0x0000)</span></a><span style="layout-grid-mode:line">, OK?</span><o:p></o:p></p>

</div>

</u1:smarttagtype></blockquote>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">Sounds reasonable.<o:p></o:p></span></font></p>

</div>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><br>
<br>
<o:p></o:p></span></font></p>

<u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName">

<div link="blue" vlink="purple" style="word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space"><p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue;layout-grid-mode:line">If the operator requests
all jobs be canceled by omitting both “job-ids” and
“my-jobs” (or supplied “my-jobs” =
‘false’), and there are no jobs that can be canceled, then return</span></font><span style="layout-grid-mode:line"> client-error-not-found (0x0406)</span><o:p></o:p></p>

<u1:p></u1:p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue">I don’t see a good way to indicate
which jobs are the offending jobs.&nbsp; Returning the “job-ids” in
the Unsupported attributes group with the values removed that could have been
canceled is about as close as I can get, but that is for a successfully
completed operation which returns the status code: </span></font><a name="_Toc518405506"><span style="layout-grid-mode:line">successful-ok-conflicting-attributes
(0x0002)</span></a><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue">.&nbsp; </span></font><o:p></o:p></p>

</div>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>

</div>

</u1:smarttagtype><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">According to 3.1.7 of RFC 2911, any operation can include an
unsupported group in its response, regardless of the status code; there are
handful of status codes that require an unsupported group be present...<o:p></o:p></span></font></p>

</div>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>

</div>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">So, I think we are OK returning the job-ids that are causing the error
in the unsupported group of the response.<o:p></o:p></span></font></p>

</div>

<div><p class="MsoNormal"><span class="apple-style-span"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">&nbsp;</span></font></span><o:p></o:p></p>

</div>

<div>

<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt" type="cite"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName">

<div link="blue" vlink="purple" style="word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space"><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy;background:red">ISSUE</span></font><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:navy;background:yellow">: OK that the Printer doesn’t try to return
which jobs are the ones causing the rejection?&nbsp; Instead, OK just to
indicate that the client can do a Get-Jobs (before or after a Cancel-Jobs
request) with a “job-ids” supplied and get the status and ownership
of each of the jobs to help the user?</span></font><o:p></o:p></p>

</div>

</u1:smarttagtype></blockquote>

</div>

<u1:p></u1:p>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">I don't like that approach since it introduces a race condition - the
offending job might change state between Get-Jobs, Cancel-Jobs, and Get-Jobs,
so better for the printer to say what the problem is instead.<o:p></o:p></span></font></p>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>

</div>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">That said, we should only include the job-ids attribute in the response
if it was supplied in the request, since otherwise we are only canceling jobs
that can be canceled at that moment.<o:p></o:p></span></font></p>

</div>

<div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>

<div><span style="orphans: 2;text-align:auto;widows: 2;-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px">

<div><p class="MsoNormal"><font size="4" color="black" face="Monaco"><span style="font-size:
13.5pt;font-family:Monaco;color:black">___________________________________________________<o:p></o:p></span></font></p>

</div>

<div><p class="MsoNormal"><font size="4" color="black" face="Monaco"><span style="font-size:
13.5pt;font-family:Monaco;color:black">Michael Sweet, Senior Printing System
Engineer<o:p></o:p></span></font></p>

</div>

<div><p class="MsoNormal"><font size="4" color="black" face="Monaco"><span style="font-size:
13.5pt;font-family:Monaco;color:black"><o:p>&nbsp;</o:p></span></font></p>

</div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"></span><o:p>&nbsp;</o:p></font></p>

</span></div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>

</div>

</div>

</div>


</o:smarttagtype></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>___________________________________________________</div><div>Michael Sweet, Senior Printing System Engineer</div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br><br />-- 
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</body></html>