<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>Stanza Headers and Internet Metadata</title>
  <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.</abstract>
  
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<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.</permissions>
<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. ##</warranty>
<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.</liability>
<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 &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
  <number>0131</number>
  <status>Draft</status>
  <type>Standards Track</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies>
    <spec>XMPP Core</spec>
    <spec>XEP-0030</spec>
  </dependencies>
  <supersedes/>
  <supersededby/>
  <shortname>shim</shortname>
  <schemaloc>
    <url>http://www.xmpp.org/schemas/shim.xsd</url>
  </schemaloc>
  <registry/>
  
  <author>
    <firstname>Peter</firstname>
    <surname>Saint-Andre</surname>
    <email>stpeter@stpeter.im</email>
    <jid>stpeter@jabber.org</jid>
    <uri>https://stpeter.im/</uri>
  </author>

  
  <author>
    <firstname>Joe</firstname>
    <surname>Hildebrand</surname>
    <email>jhildebr@cisco.com</email>
    <jid>hildjj@jabber.org</jid>
  </author>

  <revision>
    <version>1.2</version>
    <date>2006-07-12</date>
    <initials>psa</initials>
    <remark><p>Added Urgency header from registry.</p></remark>
  </revision>
  <revision>
    <version>1.1</version>
    <date>2005-08-19</date>
    <initials>psa</initials>
    <remark><p>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).</p></remark>
  </revision>
  <revision>
    <version>1.0</version>
    <date>2004-10-22</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the Jabber Council, advanced status to Draft; also added more headers from RFC 2822 to the initial registry submission.</p></remark>
  </revision>
  <revision>
    <version>0.8</version>
    <date>2004-09-29</date>
    <initials>psa</initials>
    <remark><p>Specified service discovery usage; corrected examples; further specified security considerations.</p></remark>
  </revision>
  <revision>
    <version>0.7</version>
    <date>2004-09-20</date>
    <initials>psa</initials>
    <remark><p>Specified location of headers in IQ stanzas.</p></remark>
  </revision>
  <revision>
    <version>0.6</version>
    <date>2004-07-06</date>
    <initials>psa</initials>
    <remark><p>Added "Store" header.</p></remark>
  </revision>
  <revision>
    <version>0.5</version>
    <date>2004-06-28</date>
    <initials>psa</initials>
    <remark><p>Added "Distribute" header.</p></remark>
  </revision>
  <revision>
    <version>0.4</version>
    <date>2004-05-27</date>
    <initials>psa</initials>
    <remark><p>Added "Classification" header.</p></remark>
  </revision>
  <revision>
    <version>0.3</version>
    <date>2004-05-10</date>
    <initials>psa</initials>
    <remark><p>Added headers from RFCs 2045, 2616, 2617, and 3261 to initial registration.</p></remark>
  </revision>
  <revision>
    <version>0.2</version>
    <date>2004-05-09</date>
    <initials>psa</initials>
    <remark><p>Specified registry process; added headers from RFC 2822 to initial registration; defined "Created" and "TTL" headers.</p></remark>
  </revision>
  <revision>
    <version>0.1</version>
    <date>2004-03-19</date>
    <initials>psa/jh</initials>
    <remark><p>Initial version.</p></remark>
  </revision>
</header>
<section1 topic="Introduction" anchor="intro">
  <p>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 <span class="ref"><link url="https://xmpp.org/extensions/xep-0111.html">A Transport for Initiating and Negotiating Sessions (XEP-0111)</link></span> <note>XEP-0111: A Transport for Initiating and Negotiating Sessions &lt;<link url="https://xmpp.org/extensions/xep-0111.html">https://xmpp.org/extensions/xep-0111.html</link>&gt;.</note>). Such information was formerly included in <span class="ref"><link url="https://xmpp.org/extensions/xep-0033.html">Extended Stanza Addressing (XEP-0033)</link></span> <note>XEP-0033: Extended Stanza Addressing &lt;<link url="https://xmpp.org/extensions/xep-0033.html">https://xmpp.org/extensions/xep-0033.html</link>&gt;.</note>, 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 <span class="ref"><link url="http://tools.ietf.org/html/rfc2045">RFC 2045</link></span> <note>RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies &lt;<link url="http://tools.ietf.org/html/rfc2045">http://tools.ietf.org/html/rfc2045</link>&gt;.</note>, <span class="ref"><link url="http://tools.ietf.org/html/rfc2616">RFC 2616</link></span> <note>RFC 2616: Hypertext Transport Protocol -- HTTP/1.1 &lt;<link url="http://tools.ietf.org/html/rfc2616">http://tools.ietf.org/html/rfc2616</link>&gt;.</note>, <span class="ref"><link url="http://tools.ietf.org/html/rfc2617">RFC 2617</link></span> <note>RFC 2617: HTTP Authentication: Basic and Digest Access Authentication &lt;<link url="http://tools.ietf.org/html/rfc2617">http://tools.ietf.org/html/rfc2617</link>&gt;.</note>, <span class="ref"><link url="http://tools.ietf.org/html/rfc2822">RFC 2822</link></span> <note>RFC 2822: Internet Message Format &lt;<link url="http://tools.ietf.org/html/rfc2822">http://tools.ietf.org/html/rfc2822</link>&gt;.</note>, and <span class="ref"><link url="http://tools.ietf.org/html/rfc3261">RFC 3261</link></span> <note>RFC 3261: Session Initiation Protocol (SIP) &lt;<link url="http://tools.ietf.org/html/rfc3261">http://tools.ietf.org/html/rfc3261</link>&gt;.</note>. 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".</p>
</section1>
<section1 topic="Requirements" anchor="reqs">
  <p>This protocol addresses the following requirements:</p>
  <ol>
    <li>Enable the inclusion of any header information</li>
    <li>Encapsulate all information in XML</li>
    <li>Ensure interoperability with existing non-XMPP header and metadata formats (HTTP, MIME, SIP, SMTP, etc.)</li>
  </ol>
</section1>
<section1 topic="Discovery" anchor="disco">
  <section2 topic="Protocol Support" anchor="disco-proto">
    <p>In order to discover whether another entity supports this protocol, an entity MUST use <span class="ref"><link url="https://xmpp.org/extensions/xep-0030.html">Service Discovery (XEP-0030)</link></span> <note>XEP-0030: Service Discovery &lt;<link url="https://xmpp.org/extensions/xep-0030.html">https://xmpp.org/extensions/xep-0030.html</link>&gt;.</note>.</p>
    <example caption="Entity queries another entity regarding protocol support"><![CDATA[
<iq from='romeo@montague.net/orchard'
    to='juliet@capulet.com/balcony'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
    <example caption="Queried entity communicates protocol support"><![CDATA[
<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>
]]></example>
  </section2>
  <section2 topic="Header Support" anchor="disco-header">
    <p>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'.</p>
    <example caption="Entity queries another entity regarding header support"><![CDATA[
<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>
    <example caption="Queried entity communicates header support"><![CDATA[
<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>
]]></example>
    <p>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 <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>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 &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> (see below).</p>
  </section2>
</section1>
<section1 topic="Protocol" anchor="protocol">
  <p>In a fashion similar to the structure of <cite>Extended Stanza Addressing</cite>, headers for &lt;message/&gt; and &lt;presence/&gt; stanzas are contained in a &lt;headers/&gt; 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 &lt;header/&gt; element whose 'name' attribute identifies the header and whose XML character data specifies the relevant value:
    <note>Standard XML escaping rules apply to the XML character data, so that the characters &lt; &gt; ' " &amp; MUST be escaped to &amp;lt; &amp;gt; &amp;apos; &amp;quot; &amp;amp; respectively when translating from non-XML protocols (such as MIME and SIP) to SHIM, and the escaped sequences (e.g., &amp;lt;) MUST be transformed to the equivalent non-escaped character (e.g., '&lt;') 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.</note>
  </p>
  <example caption="A basic example"><![CDATA[
<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>
]]></example>
  <p>In accordance with <span class="ref"><link url="http://tools.ietf.org/html/rfc6120">XMPP Core</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note>, an &lt;iq/&gt; 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 &lt;headers/&gt; wrapper element MUST NOT be a direct child of &lt;iq/&gt; and instead SHOULD be a grandchild of &lt;iq/&gt; and a direct child of the content-bearing child element of &lt;iq/&gt; (e.g., &lt;query/&gt;, <em>not</em> &lt;error/&gt;).</p>
  <example caption="An IQ example"><![CDATA[
<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>
]]></example>
</section1>
<section1 topic="Header Definitions" anchor="headers">
  <p>All public headers SHOULD be registered with the XMPP Registrar following the process specified in the <link url="#registrar">XMPP Registrar Considerations</link> 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.</p>
  <p>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.</p>
  <section2 topic="Classification" anchor="headers-classification">
    <p>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 <link url="#security">Security Considerations</link> for details).</p>
  </section2>
  <section2 topic="Created" anchor="headers-created">
    <p>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 <span class="ref"><link url="https://xmpp.org/extensions/xep-0082.html">XMPP Date and Time Profiles (XEP-0082)</link></span> <note>XEP-0082: XMPP Date and Time Profiles &lt;<link url="https://xmpp.org/extensions/xep-0082.html">https://xmpp.org/extensions/xep-0082.html</link>&gt;.</note>. 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.</p>
  </section2>
  <section2 topic="Distribute" anchor="headers-distribute">
    <p>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 <span class="ref"><link url="http://tools.ietf.org/html/draft-ietf-geopriv-policy">Geopriv Policy</link></span> <note>Geopriv Policy &lt;<link url="http://tools.ietf.org/html/draft-ietf-geopriv-policy">http://tools.ietf.org/html/draft-ietf-geopriv-policy</link>&gt;. Work in progress.</note>. (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 <link url="#security">Security Considerations</link> for details).</p>
  </section2>
  <section2 topic="Store" anchor="headers-store">
    <p>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 <link url="#security">Security Considerations</link> for details).</p>
  </section2>
  <section2 topic="TTL" anchor="headers-ttl">
    <p>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 <span class="ref"><link url="https://xmpp.org/extensions/xep-0079.html">Advanced Message Processing (XEP-0079)</link></span> <note>XEP-0079: Advanced Message Processing &lt;<link url="https://xmpp.org/extensions/xep-0079.html">https://xmpp.org/extensions/xep-0079.html</link>&gt;.</note>. A stanza that includes the "TTL" header SHOULD also include a "Created" header so that the recipient can properly process the stanza.</p>
    <p>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:</p>
    <example caption="Time to Live for Presence Information"><![CDATA[
<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>
]]></example>
    <p>Another potential application is specifying a time to live for <cite>Service Discovery</cite> results, which helps other entities know how long to cache such information:</p>
    <example caption="Time to Live for Disco Information"><![CDATA[
<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>
]]></example>
  </section2>
  <section2 topic="Urgency" anchor="headers-urgency">
    <p>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 <span class="ref"><link url="http://tools.ietf.org/html/draft-ietf-sieve-notify">Sieve Extension: Notifications</link></span> <note>Sieve Extension: Notifications &lt;<link url="http://tools.ietf.org/html/draft-ietf-sieve-notify">http://tools.ietf.org/html/draft-ietf-sieve-notify</link>&gt;. Work in progress.</note>) sent via XMPP, as specified in <span class="ref"><link url="http://tools.ietf.org/html/draft-ietf-sieve-notify-xmpp">Sieve Notification Mechanism: xmpp</link></span> <note>Sieve Notification Mechanism: xmpp &lt;<link url="http://tools.ietf.org/html/draft-ietf-sieve-notify-xmpp">http://tools.ietf.org/html/draft-ietf-sieve-notify-xmpp</link>&gt;. Work in progress.</note>.</p>
    <example caption="An Urgent Message"><![CDATA[
<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>
]]></example>
  </section2>
</section1>
<section1 topic="A Note About Date-Related Headers" anchor="dates">
  <p>Date formats differ widely. <span class="ref"><link url="https://xmpp.org/extensions/xep-0082.html">XMPP Date and Time Profiles (XEP-0082)</link></span> <note>XEP-0082: XMPP Date and Time Profiles &lt;<link url="https://xmpp.org/extensions/xep-0082.html">https://xmpp.org/extensions/xep-0082.html</link>&gt;.</note> defines the Date, DateTime, and Time profiles of <span class="ref"><link url="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">ISO 8601</link></span> <note>ISO 8601: Representation of Dates and Times (2000). This specification is not freely available; however, a good summary is located at &lt;<link url="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">http://www.cl.cam.ac.uk/~mgk25/iso-time.html</link>&gt;.</note>, which correspond to the Date, DateTime, and Time headers registered herein. The SHIM Date header also corresponds to the Date metadata element used in <span class="ref"><link url="http://www.dublincore.org/">Dublin Core Metadata Initiative (DCMI)</link></span> <note>The Dublin Core Metadata Initiative (DCMI) is an organization dedicated to promoting the widespread adoption of interoperable metadata standards. For further information, see &lt;<link url="http://www.dublincore.org/">http://www.dublincore.org/</link>&gt;.</note> as specified in <span class="ref"><link url="http://tools.ietf.org/html/rfc2413">RFC 2413</link></span> <note>RFC 2413: Dublin Core Metadata for Resource Discovery &lt;<link url="http://tools.ietf.org/html/rfc2413">http://tools.ietf.org/html/rfc2413</link>&gt;.</note>.</p>
  <p>However, many Internet standards use a different datetime format that ultimately derives from <span class="ref"><link url="http://tools.ietf.org/html/rfc0822">RFC 822</link></span> <note>RFC 822: Standard for the Format of ARPA Internet Text Messages &lt;<link url="http://tools.ietf.org/html/rfc0822">http://tools.ietf.org/html/rfc0822</link>&gt;.</note> as updated by <span class="ref"><link url="http://tools.ietf.org/html/rfc1123">RFC 1123</link></span> <note>RFC 1123: Requirements for Internet Hosts -- Application and Support &lt;<link url="http://tools.ietf.org/html/rfc1123">http://tools.ietf.org/html/rfc1123</link>&gt;.</note>; specifically, that format is used by email (<span class="ref"><link url="http://tools.ietf.org/html/rfc2822">RFC 2822</link></span> <note>RFC 2822: Internet Message Format &lt;<link url="http://tools.ietf.org/html/rfc2822">http://tools.ietf.org/html/rfc2822</link>&gt;.</note>), the World Wide Web (<cite>RFC 2616</cite>), and the Session Initiation Protocol (<cite>RFC 3261</cite>). To map dates to and from these protocols, we define the SHIM RFC2822Date header.</p>
</section1>
<section1 topic="Security Considerations" anchor="security">
  <p>In general, security considerations are the responsibility of the "using protocol".</p>
  <p>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 <link url="#disco">Service Discovery</link>; furthermore, an implementation MUST warn a human user (if any) before use if the security-sensitive headers of interest are not supported.</p>
</section1>
<section1 topic="IANA Considerations" anchor="iana">
  <p>This document requires no interaction with the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>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 &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <section2 topic="Protocol Namespaces" anchor="registrar-ns">
    <p>The XMPP Registrar includes 'http://jabber.org/protocol/shim' in its registry of protocol namespaces (see &lt;<link url="https://xmpp.org/registrar/shim.html">https://xmpp.org/registrar/shim.html</link>&gt;).</p>
  </section2>
  <section2 topic="Well-Known Service Discovery Nodes" anchor="registrar-nodes">
    <p>The XMPP Registrar includes 'http://jabber.org/protocol/shim' in its registry of well-known Service Discovery nodes.</p>
  </section2>
  <section2 topic="SHIM Headers Registry" anchor="registrar-shim">
    <p>The XMPP Registrar maintains a registry of SHIM headers.</p>
    <section3 topic="Process" anchor="registrar-shim-process">
      <p>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 &lt;registrar@xmpp.org&gt;:</p>
      <code><![CDATA[
<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>
]]></code>
      <p>The registrant may register more than one header at a time, each contained in a separate &lt;header/&gt; element.</p>
    </section3>
    <section3 topic="Initial Registration" anchor="registrar-shim-init">
      <code><![CDATA[
<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>

]]></code>
    </section3>
  </section2>
</section1>
<section1 topic="XML Schema" anchor="schema">
  <code><![CDATA[
<?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>
]]></code>
</section1>
</xep>
