rfc3196.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,763 行 · 第 1/5 页
TXT
1,763 行
Hastings, et al. Informational [Page 19]
RFC 3196 Internet Printing Protocol/1.1 November 2001
Likewise, it is advantageous for clients to support both versions to
allow interoperability with new and legacy Printers.
3.1.2.1.2 Validate operation identifier
The Printer object checks to see if the "operation-id" attribute
supplied by the client is supported as indicated in the Printer
object's "operations-supported" attribute. If not, the Printer
REJECTS the request and returns the 'server-error-operation-not-
supported' status code in the response.
3.1.2.1.3 Validate the request identifier
The Printer object SHOULD NOT check to see if the "request-id"
attribute supplied by the client is in range: between 1 and 2**31 - 1
(inclusive), but copies all 32 bits.
Note: The "version-number", "operation-id", and the "request-id"
parameters are in fixed octet positions in the IPP/1.1 encoding. The
"version-number" parameter will be the same fixed octet position in
all versions of the protocol. These fields are validated before
proceeding with the rest of the validation.
3.1.2.1.4 Validate attribute group and attribute presence and order
The order of the following validation steps depends on
implementation.
3.1.2.1.4.1 Validate the presence and order of attribute groups
Client requests and IPP object responses contain attribute groups
that Section 3 requires to be present and in a specified order. An
IPP object verifies that the attribute groups are present and in the
correct order in requests supplied by clients (attribute groups
without an * in the following tables).
If an IPP object receives a request with (1) required attribute
groups missing, or (2) the attributes groups are out of order, or (3)
the groups are repeated, the IPP object REJECTS the request and
RETURNS the 'client-error-bad-request' status code. For example, it
is an error for the Job Template Attributes group to occur before the
Operation Attributes group, for the Operation Attributes group to be
omitted, or for an attribute group to occur more than once, except in
the Get-Jobs response.
Since this kind of attribute group error is most likely to be an
error detected by a client developer rather than by a customer, the
IPP object NEED NOT return an indication of which attribute group was
Hastings, et al. Informational [Page 20]
RFC 3196 Internet Printing Protocol/1.1 November 2001
in error in either the Unsupported Attributes group or the Status
Message. Also, the IPP object NEED NOT find all attribute group
errors before returning this error.
3.1.2.1.4.2 Ignore unknown attribute groups in the expected position
Future attribute groups may be added to the specification at the end
of requests just before the Document Content and at the end of
response, except for the Get-Jobs response, where it maybe there or
before the first job attributes returned. If an IPP object receives
an unknown attribute group in these positions, it ignores the entire
group, rather than returning an error, since that group may be a new
group in a later minor version of the protocol that can be ignored.
(If the new attribute group cannot be ignored without confusing the
client, the major version number would have been increased in the
protocol document and in the request). If the unknown group occurs
in a different position, the IPP object REJECTS the request and
RETURNS the 'client-error-bad-request' status code.
Clients also ignore unknown attribute groups returned in a response.
Note: By validating that requests are in the proper form, IPP
objects force clients to use the proper form which, in turn,
increases the chances that customers will be able to use such clients
from multiple vendors with IPP objects from other vendors.
3.1.2.1.4.3 Validate the presence of a single occurrence of required
Operation attributes
Client requests and IPP object responses contain Operation attributes
that [RFC2911] Section 3 requires to be present. Attributes within a
group may be in any order, except for the ordering of target,
charset, and natural languages attributes. These attributes MUST be
first, and MUST be supplied in the following order: charset, natural
language, and then target. An IPP object verifies that the
attributes that Section 4 requires to be supplied by the client have
been supplied in the request (attributes without an * in the
following tables). An asterisk (*) indicates groups and Operation
attributes that the client may omit in a request or an IPP object may
omit in a response.
If an IPP object receives a request with required attributes missing
or repeated from a group or in the wrong position, the behavior of
the IPP object is IMPLEMENTATION DEPENDENT. Some of the possible
implementations are:
REJECTS the request and RETURNS the 'client-error-bad-request'
status code
Hastings, et al. Informational [Page 21]
RFC 3196 Internet Printing Protocol/1.1 November 2001
accepts the request and uses the first occurrence of the attribute
no matter where it is
accepts the request and uses the last occurrence of the attribute
no matter where it is
accept the request and assume some default value for the missing
attribute
Therefore, client MUST send conforming requests, if they want to
receive the same behavior from all IPP object implementations. For
example, it is an error for the "attributes-charset" or "attributes-
natural-language" attribute to be omitted in any operation request,
or for an Operation attribute to be supplied in a Job Template group
or a Job Template attribute to be supplied in an Operation Attribute
group in a create request. It is also an error to supply the
"attributes-charset" attribute twice.
Since these kinds of attribute errors are most likely to be detected
by a client developer rather than by a customer, the IPP object NEED
NOT return an indication of which attribute was in error in either
the Unsupported Attributes group or the Status Message. Also, the
IPP object NEED NOT find all attribute errors before returning this
error.
The following tables list all the attributes for all the operations
by attribute group in each request and each response. The order of
the groups is the order that the client supplies the groups as
specified in [RFC2911] Section 3. The order of the attributes within
a group is arbitrary, except as noted for some of the special
operation attributes (charset, natural language, and target). The
tables below use the following notation:
R indicates a REQUIRED attribute or operation that an IPP
object MUST support
O indicates an OPTIONAL attribute or operation that an IPP
object NEED NOT support
* indicates that a client MAY omit the attribute in a request
and that an IPP object MAY omit the attribute in a response.
The absence of an * means that a client MUST supply the
attribute in a request and an IPP object MUST supply the
attribute in a response.
+ indicates that this is not a IPP/1.0 operation, but is only
a part of IPP/1.1 and future versions of IPP.
Hastings, et al. Informational [Page 22]
RFC 3196 Internet Printing Protocol/1.1 November 2001
Operation Requests
The tables below show the attributes in their proper attribute groups
for operation requests:
Note: All operation requests contain "version-number", "operation-
id", and "request-id" parameters.
Print-Job Request (R):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
printer-uri (R)
requesting-user-name (R*)
job-name (R*)
ipp-attribute-fidelity (R*)
document-name (R*)
document-format (R*)
document-natural-language (O*)
compression (R*)
job-k-octets (O*)
job-impressions (O*)
job-media-sheets (O*)
Group 2: Job Template Attributes (R*)
<Job Template attributes> (O*)
(see [RFC2911] Section 4.2)
Group 3: Document Content (R)
<document content>
Validate-Job Request (R):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
printer-uri (R)
requesting-user-name (R*)
job-name (R*)
ipp-attribute-fidelity (R*)
document-name (R*)
document-format (R*)
document-natural-language (O*)
compression (R*)
job-k-octets (O*)
job-impressions (O*)
job-media-sheets (O*)
Group 2: Job Template Attributes (R*)
<Job Template attributes> (O*)
(see [RFC2911] Section 4.2)
Hastings, et al. Informational [Page 23]
RFC 3196 Internet Printing Protocol/1.1 November 2001
Print-URI Request (O):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
printer-uri (R)
document-uri (R)
requesting-user-name (R*)
job-name (R*)
ipp-attribute-fidelity (R*)
document-name (R*)
document-format (R*)
document-natural-language (O*)
compression (R*)
job-k-octets (O*)
job-impressions (O*)
job-media-sheets (O*)
Group 2: Job Template Attributes (R*)
<Job Template attributes> (O*) (see
(see [RFC2911] Section 4.2)
Create-Job Request (O):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
printer-uri (R)
requesting-user-name (R*)
job-name (R*)
ipp-attribute-fidelity (R*)
job-k-octets (O*)
job-impressions (O*)
job-media-sheets (O*)
Group 2: Job Template Attributes (R*)
<Job Template attributes> (O*) (see
(see [RFC2911] Section 4.2)
Get-Printer-Attributes Request (R):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
printer-uri (R)
requesting-user-name (R*)
requested-attributes (R*)
document-format (R*)
Get-Jobs Request (R):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
Hastings, et al. Informational [Page 24]
RFC 3196 Internet Printing Protocol/1.1 November 2001
printer-uri (R)
requesting-user-name (R*)
limit (R*)
requested-attributes (R*)
which-jobs (R*)
my-jobs (R*)
Send-Document Request (O):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
(printer-uri & job-id) | job-uri (R)
last-document (R)
requesting-user-name (R*)
document-name (R*)
document-format (R*)
document-natural-language (O*)
compression (R*)
Group 2: Document Content (R*)
<document content>
Send-URI Request (O):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
(printer-uri & job-id) | job-uri (R)
last-document (R)
document-uri (R)
requesting-user-name (R*)
document-name (R*)
document-format (R*)
document-natural-language (O*)
compression (R*)
Cancel-Job Request (R):
Release-Job Request (O+):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
(printer-uri & job-id) | job-uri (R)
requesting-user-name (R*)
message (O*)
Hastings, et al. Informational [Page 25]
RFC 3196 Internet Printing Protocol/1.1 November 2001
Get-Job-Attributes Request (R):
Group 1: Operation Attributes (R)
attributes-charset (R)
attributes-natural-language (R)
(printer-uri & job-id) | job-uri (R)
requesting-user-name (R*)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?