XEP-0131: Stanza Headers and Internet Metadata

Abstract
This specification defines an XMPP protocol extension for representing non-address-related headers in an XML format that is appropriate for use in XMPP. While the protocol provides a flexible mechanism for representing many kinds of standard Internet metadata, a registry of values is defined to structure the possible range of headers, and the inital registration includes headers from email, HTTP, MIME, and SIP.
Authors
  • Peter Saint-Andre
  • Joe Hildebrand
Copyright
© 2004 – 2006 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Stable

NOTICE: The protocol defined herein is a Stable Standard of the XMPP Standards Foundation. Implementations are encouraged and the protocol is appropriate for deployment in production systems, but some changes to the protocol are possible before it becomes a Final Standard.
Type
Standards Track
Version
1.2 (2006-07-12)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Stable
  4. Final

1. Introduction

In order to ensure proper processing by the recipient of an XML stanza, some Jabber protocols and other XMPP extensions may need to enable the sender to communicate non-addressing information about the stanza (this is especially true of protocols that translate from a foreign format to XMPP; a good example is A Transport for Initiating and Negotiating Sessions (XEP-0111) [1]). Such information was formerly included in Extended Stanza Addressing (XEP-0033) [2], but was removed from that specification when it was changed to focus on addressing information only. Therefore, this document defines a mechanism for encapsulating non-addressing "header" information about stanzas, including standard Internet metadata such as that defined by RFC 2045 [3], RFC 2616 [4], RFC 2617 [5], RFC 2822 [6], and RFC 3261 [7]. Such information is encapsulated in a protocol extension qualified by the 'http://jabber.org/protocol/shim' namespace, where "SHIM" stands for "Stanza Headers and Internet Metadata".

2. Requirements

This protocol addresses the following requirements:

  1. Enable the inclusion of any header information
  2. Encapsulate all information in XML
  3. Ensure interoperability with existing non-XMPP header and metadata formats (HTTP, MIME, SIP, SMTP, etc.)

3. Discovery

3.1 Protocol Support

In order to discover whether another entity supports this protocol, an entity MUST use Service Discovery (XEP-0030) [8].

Example 1. Entity queries another entity regarding protocol support
<iq from='romeo@montague.net/orchard'
    to='juliet@capulet.com/balcony'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Example 2. Queried entity communicates protocol support
<iq from='romeo@montague.net/orchard'
    to='juliet@capulet.com/balcony'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    ...
    <feature var='http://jabber.org/protocol/shim'/>
    ...
  </query>
</iq>

3.2 Header Support

It can be desirable (and, in some contexts, necessary) to determine if the intended recipient of an XML stanza supports a specific header (e.g., the "Classification" header) before sending information that may depend on that header. Therefore, implementations of this protocol MUST advertise which particular SHIM headers they support when queried via disco#info at the well-known service discovery node 'http://jabber.org/protocol/shim'.

Example 3. Entity queries another entity regarding header support
<iq from='romeo@montague.net/orchard'
    to='juliet@capulet.com/balcony'>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='http://jabber.org/protocol/shim'/>
</iq>
Example 4. Queried entity communicates header support
<iq from='romeo@montague.net/orchard'
    to='juliet@capulet.com/balcony'>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='http://jabber.org/protocol/shim'>
    ...
    <feature var='http://jabber.org/protocol/shim#Classification'/>
    <feature var='http://jabber.org/protocol/shim#Distribute'/>
    <feature var='http://jabber.org/protocol/shim#Store'/>
    ...
  </query>
</iq>

The values of the 'var' attribute MUST be of the form "http://jabber.org/protocol/shim#header", where "header" is to be replaced with the name of the header as registered with the XMPP Registrar [9] (see below).

4. Protocol

In a fashion similar to the structure of Extended Stanza Addressing, headers for <message/> and <presence/> stanzas are contained in a <headers/> wrapper element qualified by the 'http://jabber.org/protocol/shim' namespace; each header is a child of this wrapper element, and is encapsulated via a <header/> element whose 'name' attribute identifies the header and whose XML character data specifies the relevant value: [10]

Example 5. A basic example
<message from='romeo@montague.net/orchard'
         to='juliet@capulet.com/balcony'>
  <body>Neither, fair saint, if either thee dislike.</body>
  <headers xmlns='http://jabber.org/protocol/shim'>
    <header name='In-Reply-To'>123456789@capulet.com</header>
    <header name='Keywords'>shakespeare,&lt;xmpp/&gt;</header>
  </headers>
</message>

In accordance with XMPP Core [11], an <iq/> stanza must not contain more than one non-error child element; this places constraints on the location of SHIM headers in the XML hierarchy. Specifically, the <headers/> wrapper element MUST NOT be a direct child of <iq/> and instead SHOULD be a grandchild of <iq/> and a direct child of the content-bearing child element of <iq/> (e.g., <query/>, not <error/>).

Example 6. An IQ example
<iq from='romeo@montague.net/orchard'
    to='juliet@capulet.com/balcony'
    id='ping1'>
  <query xmlns='jabber:iq:time'>
    <headers xmlns='http://jabber.org/protocol/shim'>
      <header name='Created'>2004-09-21T03:01:52Z</header>
    </headers>
  </query>
</iq>

5. Header Definitions

All public headers SHOULD be registered with the XMPP Registrar following the process specified in the XMPP Registrar Considerations section of this document. Many such headers are defined by other protocol specifications, such as RFCs 2045, 2616, 2617, 2822, and 3261; implementors MUST refer to those specifications for definition of the relevant headers.

This document defines several additional headers that may prove useful within Jabber protocols and other XMPP extensions, as specified in the following sections; further headers may be registered with the XMPP Registrar, either directly or via definition in XMPP Extension Protocol specifications.

5.1 Classification

The Classification header enables a sender or other entity to classify a stanza according to some classification scheme. The values of the XML character data contained within this header are out of scope for this document, since they are determined by the using application. Note: This header may be security-sensitive (see the Security Considerations for details).

5.2 Created

The Date header is defined by RFC 2822 and therefore follows the date and time format defined by RFC 2822; while this header is thus useful for translating email messages into XMPP stanzas, it is not consistent with XMPP Date and Time Profiles (XEP-0082) [12]. Therefore we define the "Created" header, which specifies the date and time when a stanza was created by the originating entity, where the value conforms to the DateTime profile specified in XEP-0082.

5.3 Distribute

The Distribute header enables a sender to specify whether the stanza may be further distributed by the recipient to other entities on the network. The allowable values for this header are "true" and "false". If the sender specifies a value of "false", the recipient MUST NOT further distribute the stanza or any information contained therein; if the sender specifies a value of "true", the recipient MAY further distribute the stanza or any information contained therein; if the value is anything other than "true" or "false" and the recipient does not understand the value, the recipient MUST assume the default value of "false". This header is semantically equivalent to the "Distribute" flag defined in Geopriv Policy [13]. (The HTTP "Max-Forwards" header is not appropriate for this usage, since it defines proxy and gateway behavior rather than recipient behavior.) Note: This header may be security-sensitive (see the Security Considerations for details).

5.4 Store

The Store header enables a sender to specify whether the stanza may be stored or archived by the recipient. The allowable values for this header are "true" and "false". If the sender specifies a value of "false", the recipient MUST NOT store the stanza or any information contained therein; if the sender specifies a value of "true", the recipient MAY store the stanza or any information contained therein; if the value is anything other than "true" or "false" and the recipient does not understand the value, the recipient MUST assume the default value of "false". Note: This header may be security-sensitive (see the Security Considerations for details).

5.5 TTL

It may be useful to specify that the information contained in a stanza is valid only for a limited period of time. Such is the function of the "TTL" header, the value of which is some number of seconds since the creation of the stanza. Note well that this header is purely informational and MUST NOT be used for routing or delivery of XML stanzas, since that function is already served by Advanced Message Processing (XEP-0079) [14]. A stanza that includes the "TTL" header SHOULD also include a "Created" header so that the recipient can properly process the stanza.

One situation in which both the "Created" and "TTL" headers might prove valuable is the broadcasting of structured presence information, such as a calendar-generated notification that a user will be in a meeting for the next hour:

Example 7. Time to Live for Presence Information
<presence>
  <show>dnd</show>
  <status>in a meeting</status>
  <headers xmlns='http://jabber.org/protocol/shim'>
    <header name='Created'>2004-05-10T11:00Z</header>
    <header name='TTL'>3600</header>
  </headers>
</presence>

Another potential application is specifying a time to live for Service Discovery results, which helps other entities know how long to cache such information:

Example 8. Time to Live for Disco Information
<iq from='example.com'
    id='some-id'
    to='example.org'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    ...
    <feature var='http://jabber.org/protocol/amp'/>
    ...
    <headers xmlns='http://jabber.org/protocol/shim'>
      <header name='Created'>2004-05-17T20:47Z</header>
      <header name='TTL'>86400</header>
    </headers>
  </query>
</iq>

5.6 Urgency

It can be useful to specify that the information contained in a stanza is more or less time-sensitive (e.g., in order to help the recipient determine whether to attend to the information immediately or to delay attending to the information). Such is the function of the "Urgency" header, the value of which is "high", "medium", or "low". One use of the header is Sieve notifications (see Sieve Extension: Notifications [15]) sent via XMPP, as specified in Sieve Notification Mechanism: xmpp [16].

Example 9. An Urgent Message
<message
    from='romeo@shakespeare.lit/orchard'
    to='juliet@capulet.com'
    type='chat'>
  <body>Wherefore are thou?!?</body>
  <headers xmlns='http://jabber.org/protocol/shim'>
    <header name='Urgency'>high</header>
  </headers>
</message>

6. A Note About Date-Related Headers

Date formats differ widely. XMPP Date and Time Profiles (XEP-0082) [12] defines the Date, DateTime, and Time profiles of ISO 8601 [17], which correspond to the Date, DateTime, and Time headers registered herein. The SHIM Date header also corresponds to the Date metadata element used in Dublin Core Metadata Initiative (DCMI) [18] as specified in RFC 2413 [19].

However, many Internet standards use a different datetime format that ultimately derives from RFC 822 [20] as updated by RFC 1123 [21]; specifically, that format is used by email (RFC 2822 [6]), the World Wide Web (RFC 2616), and the Session Initiation Protocol (RFC 3261). To map dates to and from these protocols, we define the SHIM RFC2822Date header.

7. Security Considerations

In general, security considerations are the responsibility of the "using protocol".

Certain SHIM headers MAY be security-sensitive (e.g., the "Classification", "Distribute", and "Store" headers specified herein). If an entity plans to use such headers, it MUST determine whether the intended recipient supports both the SHIM protocol and the particular security-sensitive headers of interst, as described under Service Discovery; furthermore, an implementation MUST warn a human user (if any) before use if the security-sensitive headers of interest are not supported.

8. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [22].

9. XMPP Registrar Considerations

9.1 Protocol Namespaces

The XMPP Registrar includes 'http://jabber.org/protocol/shim' in its registry of protocol namespaces (see <https://xmpp.org/registrar/shim.html>).

9.2 Well-Known Service Discovery Nodes

The XMPP Registrar includes 'http://jabber.org/protocol/shim' in its registry of well-known Service Discovery nodes.

9.3 SHIM Headers Registry

The XMPP Registrar maintains a registry of SHIM headers.

9.3.1 Process

In order to submit new values to this registry, the registrant shall define an XML fragment of the following form and either include it in the relevant XMPP Extension Protocol or send it to the email address <registrar@xmpp.org>:

<header>
  <name>the value of the 'name' attribute</name>
  <desc>a natural-language description of the header</desc>
  <doc>the document in which this header is specified</doc>
</header>

The registrant may register more than one header at a time, each contained in a separate <header/> element.

9.3.2 Initial Registration

<header>
  <name>Accept</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Accept-Charset</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Accept-Encoding</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Accept-Language</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Accept-Ranges</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Age</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Alert-Info</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Allow</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Authentication-Info</name>
  <desc>see RFC 2617</desc>
  <doc>RFC 2617</doc>
</header>

<header>
  <name>Cache-Control</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Call-ID</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Call-Info</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Classification</name>
  <desc>a level within a classification scheme</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>Comments</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Connection</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Contact</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Content-Description</name>
  <desc>see RFC 2045</desc>
  <doc>RFC 2045</doc>
</header>

<header>
  <name>Content-Disposition</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Content-Encoding</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Content-ID</name>
  <desc>see RFC 2045</desc>
  <doc>RFC 2045</doc>
</header>

<header>
  <name>Content-Language</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Content-Length</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Content-Location</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Content-MD5</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Content-Range</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Content-Transfer-Encoding</name>
  <desc>see RFC 2045</desc>
  <doc>RFC 2045</doc>
</header>

<header>
  <name>Content-Type</name>
  <desc>see RFC 2045 or RFC 2616</desc>
  <doc>RFC 2045 or RFC 2616</doc>
</header>

<header>
  <name>Contributor</name>
  <desc>an entity other than the primary Creator who helped to create a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Coverage</name>
  <desc>the spatial or temporal characteristics of a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Created</name>
  <desc>date and time of stanza creation in ISO 8601 format</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>Creator</name>
  <desc>the person or organization responsible for creating the content of a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>CSeq</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Date</name>
  <desc>a string that conforms to the Date profile specified in XEP-0082</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>DateTime</name>
  <desc>a string that conforms to the DateTime profile specified in XEP-0082</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>Description</name>
  <desc>a textual description of the content of a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Distribute</name>
  <desc>whether or not the stanza may be further distributed</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>Error-Info</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>ETag</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Expect</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Expires</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Format</name>
  <desc>the data format of a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Host</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Identifier</name>
  <desc>a string or number used to identity a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>If-Match</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>If-Modified-Since</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>If-None-Match</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>If-Range</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>If-Unmodified-Since</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>In-Reply-To</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Keywords</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Language</name>
  <desc>the language in expressing the content of a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Last-Modified</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Location</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Max-Forwards</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Message-ID</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>MIME-Version</name>
  <desc>see RFC 2045</desc>
  <doc>RFC 2045</doc>
</header>

<header>
  <name>Organization</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Pragma</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Priority</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Proxy-Authenticate</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Proxy-Authorization</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Publisher</name>
  <desc>the entity responsible for making a resource available</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Range</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Received</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Record-Route</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>References</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Referer</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Relation</name>
  <desc>the identifier of a second resource related to a primary resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Reply-To</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Require</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Resent-Bcc</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Resent-Cc</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Resent-Date</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Resent-From</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Resent-Message-Id</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Resent-Sender</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Resent-To</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Retry-After</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Return-Path</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>RFC2822Date</name>
  <desc>the datetime associated with an email message, SIP exchange, or HTTP request</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Rights</name>
  <desc>a rights management statement, identifier, or link</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Route</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Sender</name>
  <desc>see RFC 2822</desc>
  <doc>RFC 2822</doc>
</header>

<header>
  <name>Server</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Source</name>
  <desc>information about the original source of the present resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Store</name>
  <desc>whether or not the stanza may be stored or archived</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>Subject</name>
  <desc>the human-readable topic of a message or resource</desc>
  <doc>RFC 2822 or RFC 2413</doc>
</header>

<header>
  <name>Supported</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>TE</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Time</name>
  <desc>a string that conforms to the Time profile specified in XEP-0082</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>Timestamp</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Title</name>
  <desc>the name given to a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Trailer</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Transfer-Encoding</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>TTL</name>
  <desc>a time to live for the stanza, in seconds</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>Type</name>
  <desc>the category of a resource</desc>
  <doc>RFC 2413</doc>
</header>

<header>
  <name>Unsupported</name>
  <desc>see RFC 3261</desc>
  <doc>RFC 3261</doc>
</header>

<header>
  <name>Upgrade</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Urgency</name>
  <desc>the time sensitivity of a stanza ("high", "medium", or "low")</desc>
  <doc>XEP-0131</doc>
</header>

<header>
  <name>User-Agent</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Vary</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Via</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>Warning</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

<header>
  <name>WWW-Authenticate</name>
  <desc>see RFC 2616</desc>
  <doc>RFC 2616</doc>
</header>

10. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='http://jabber.org/protocol/shim'
    xmlns='http://jabber.org/protocol/shim'
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      XEP-0131: http://www.xmpp.org/extensions/xep-0131.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='headers'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='header' minOccurs='0' maxOccurs='unbounded'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name='header'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='xs:string'>
          <xs:attribute name='name' use='required'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

</xs:schema>

Appendices

Appendix A: Document Information

Series
XEP
Number
0131
Publisher
XMPP Standards Foundation
Status
Stable
Type
Standards Track
Version
1.2
Last Updated
2006-07-12
Approving Body
XMPP Council
Dependencies
XMPP Core, XEP-0030
Supersedes
None
Superseded By
None
Short Name
shim
Schema
<http://www.xmpp.org/schemas/shim.xsd>
Registry
<https://xmpp.org/registrar/shim.html>
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Peter Saint-Andre
Email
stpeter@stpeter.im
JabberID
stpeter@jabber.org
URI
https://stpeter.im/
Joe Hildebrand
Email
jhildebr@cisco.com
JabberID
hildjj@jabber.org

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

1. XEP-0111: A Transport for Initiating and Negotiating Sessions <https://xmpp.org/extensions/xep-0111.html>.

2. XEP-0033: Extended Stanza Addressing <https://xmpp.org/extensions/xep-0033.html>.

3. RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies <http://tools.ietf.org/html/rfc2045>.

4. RFC 2616: Hypertext Transport Protocol -- HTTP/1.1 <http://tools.ietf.org/html/rfc2616>.

5. RFC 2617: HTTP Authentication: Basic and Digest Access Authentication <http://tools.ietf.org/html/rfc2617>.

6. RFC 2822: Internet Message Format <http://tools.ietf.org/html/rfc2822>.

7. RFC 3261: Session Initiation Protocol (SIP) <http://tools.ietf.org/html/rfc3261>.

8. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.

9. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.

10. Standard XML escaping rules apply to the XML character data, so that the characters < > ' " & MUST be escaped to &lt; &gt; &apos; &quot; &amp; respectively when translating from non-XML protocols (such as MIME and SIP) to SHIM, and the escaped sequences (e.g., &lt;) MUST be transformed to the equivalent non-escaped character (e.g., '<') when translating from SHIM to the non-XML protocol. Escaping and unescaping will normally be performed by a gateway that translates between XMPP and a foreign protocol such as MIME or SIP.

11. RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc6120>.

12. XEP-0082: XMPP Date and Time Profiles <https://xmpp.org/extensions/xep-0082.html>.

13. Geopriv Policy <http://tools.ietf.org/html/draft-ietf-geopriv-policy>. Work in progress.

14. XEP-0079: Advanced Message Processing <https://xmpp.org/extensions/xep-0079.html>.

15. Sieve Extension: Notifications <http://tools.ietf.org/html/draft-ietf-sieve-notify>. Work in progress.

16. Sieve Notification Mechanism: xmpp <http://tools.ietf.org/html/draft-ietf-sieve-notify-xmpp>. Work in progress.

17. ISO 8601: Representation of Dates and Times (2000). This specification is not freely available; however, a good summary is located at <http://www.cl.cam.ac.uk/~mgk25/iso-time.html>.

18. The Dublin Core Metadata Initiative (DCMI) is an organization dedicated to promoting the widespread adoption of interoperable metadata standards. For further information, see <http://www.dublincore.org/>.

19. RFC 2413: Dublin Core Metadata for Resource Discovery <http://tools.ietf.org/html/rfc2413>.

20. RFC 822: Standard for the Format of ARPA Internet Text Messages <http://tools.ietf.org/html/rfc0822>.

21. RFC 1123: Requirements for Internet Hosts -- Application and Support <http://tools.ietf.org/html/rfc1123>.

22. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 1.2 (2006-07-12)

    Added Urgency header from registry.

    psa
  2. Version 1.1 (2005-08-19)

    Added Date, DateTime, and Time headers conforming to profiles from XEP-0082; renamed Date header to RFC2822Date; added note about date-related headers; added headers from RFC 2413 (Dublin Core).

    psa
  3. Version 1.0 (2004-10-22)

    Per a vote of the Jabber Council, advanced status to Draft; also added more headers from RFC 2822 to the initial registry submission.

    psa
  4. Version 0.8 (2004-09-29)

    Specified service discovery usage; corrected examples; further specified security considerations.

    psa
  5. Version 0.7 (2004-09-20)

    Specified location of headers in IQ stanzas.

    psa
  6. Version 0.6 (2004-07-06)

    Added "Store" header.

    psa
  7. Version 0.5 (2004-06-28)

    Added "Distribute" header.

    psa
  8. Version 0.4 (2004-05-27)

    Added "Classification" header.

    psa
  9. Version 0.3 (2004-05-10)

    Added headers from RFCs 2045, 2616, 2617, and 3261 to initial registration.

    psa
  10. Version 0.2 (2004-05-09)

    Specified registry process; added headers from RFC 2822 to initial registration; defined "Created" and "TTL" headers.

    psa
  11. Version 0.1 (2004-03-19)

    Initial version.

    psa/jh

Appendix I: Bib(La)TeX Entry

@report{saint-andre2004shim,
  title = {Stanza Headers and Internet Metadata},
  author = {Saint-Andre, Peter and Hildebrand, Joe},
  type = {XEP},
  number = {0131},
  version = {1.2},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0131.html},
  date = {2004-03-19/2006-07-12},
}

END