%ents; ]>
HTTP Scheme for URL Data This JEP provides a schema description for detailed information about HTTP URLs. &LEGALNOTICE; 0104 Deferred Standards Track Standards JIG XMPP Core RFC 3986 RFC 2616 RFC 2617 JEP-0103 N/A Matthew Miller linuxwolf@outer-planes.net linuxwolf@outer-planes.net 0.3 2004-01-20 lw Reorganized for JEP Editor preferences; Removed (outdated) references to JEP-0070 0.2 2003-09-19 lw Added more information about cookies; Added more information about headers 0.1 2003-06-30 lw Initial version.

The most common URL scheme distributed over the Internet is HTTP and HTTPS. This JEP defines a structure that extends &jep0103; to enable more advanced access to such URLs within Jabber.

This JEP supplements JEP-0103 to provide more detailed information about HTTP and HTTPS URLs. The requirements this JEP fulfills are:

The intent of this information is to provide an HTTP client with enough information in order to construct the HTTP request and entity headers necessary, as defined in &rfc2616;.

The use of this JEP in conjunction with JEP-0103 is OPTIONAL. The entity sending the URL is not required to provide any of this information, and receiving entities MAY ignore it.

The two most typical types of information that can be necessary for accessing an HTTP URL are authentication details and cookies. In some cases, custom headers MAY also be necessary for successful use. Authentication information is provided in a scheme-independent format. Cookie data provided includes what would be necessary for a client to properly persist the value.

At a minimum, this JEP allows for an entity to indicate what authentication scheme is in use:

]]>

To provide additional parameters (such as a realm and username/password), the <auth-param/> element is used:

]]>

Cookie information is provided by the <cookie/> element. This element can provide all of the information of the "Set-Cookie" response header"Set-Cookie" is a message header for the HTTP response, and the <header/> element represents only message headers for HTTP requests. Therefore, cookies are handled differently.. The simplest usage is:

]]>

The above cookie is considered "transient", and will terminate when the HTTP session ends. Additional information about the cookie can be provided:

]]>

As demonstrated, the <cookie/> provides all the attributes provided by the "Set-Cookie" header. The only attributes required are "name" and "value".

In some cases, arbitrary headers are necessary. They are provided using the <header/> element:

]]>

Entities receiving cookie information SHOULD following the state management guidelines from &rfc2109;. In particular, the interpretation of the "persistence details" attribute values from <cookie/> is that defined in section 4.2.2 of RFC 1209.

The attributes provided by <cookie/> MUST NOT be "pre-escaped" for HTTP message headers. it is the responsibility of the receiving entity to properly encode cookie information into the "cookie" message header, including any character escaping.

The <header/> element only provides those message headers used for an HTTP request. There is currently no mechanism to convey HTTP response headers.

The name and value attributes from <header/> MUST NOT be "pre-escaped" for HTTP message headers. It is the responsibility of the receiving entity to properly encode message headers, including any character escaping.

The namespace for this structure is "http://jabber.org/protocol/url-data/scheme/http". Because this namespace is intended to supplement the <url-data/> element, this namespace SHOULD be declared within the <url-data/> element using the "http" namespace prefix (as demonstrated in the examples above). This namespace MUST only be applied when the "target" attribute in <url-data/> uses the scheme "http" or "https".

The <auth/> element provides authentication information, including scheme. The contents of this element detail any additional parameters for authentication.

The "scheme" attribute describes the HTTP authentication scheme to use. This attribute MUST be present, and MUST be the name of an HTTP authentication scheme (such as "basic").

The <auth-param/> element provides authentication parameters. This element has attributes for the parameter name and value.

The "name" attribute specifies the (logical) name of the authentication parameter. This attribute MUST be present, and MUST be applicable to the given scheme, although "realm" is always a valid parameter.

The "value" attribute specifies the value for this authentication parameter. This attribute MUST be present, but MAY be empty if a value is not required.

The <cookie/> element provides client cookie data. This element has attributes for the cookie name and value, as well as the persistence details.

The "name" attribute specifies the name of the cookie. This attribute MUST be present, and MUST NOT be empty. It corresponds to the "name" in the "name=value" syntax.

The "value" attribute specifies the value for the cookie. This attribute MUST be present, but MAY be empty if a value is not required. It corresponds to the "value" in the "name=value" syntax.

The "comment" attribute provides the description of the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL.

The "domain" attribute provides the applicable domain of the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL.

The "path" attribute provides the applicable HTTP path of the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL.

The "max-age" attribute provides the maximum age for the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL, and MUST be a non-negative integer. If not specified, the default value is "0".

The "secure" attribute indicates if this cookie is only offered in secure environments, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL, and MUST be a boolean value of "true" or "false". The default value is "false".

The "version" attribute provides the version of the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL, and SHOULD be "1.0" unless otherwise needed. If not specified, the default value is "1.0".

The <header/> element provides generic request and entity header information, to be included in the connection attempt. This element is ONLY for message headers included in the HTTP request; it SHOULD NOT be used for message headers included in the HTTP response. The attributes for this element are the name and value of the header.

The "name" attribute specifies the name of the header. This attribute MUST be present, and MUST conform to the "field-name" pattern for RFC 2616. It corresponds to the "name" in the (simplified) "name: value" header syntax.

The "value" attribute specifies the value of the header. This attribute MUST be present, and MUST conform to the "field-value" pattern for RFC 2616. It MAY empty if a value is not required. It corresponds to the "value" in the (simplified) "name: value" header syntax.

]]>

This JEP allows complete authentication information to be passed. This information is only as secure as the connection-path between the provider and acceptor.

This JEP requires no interaction with &IANA;.

The ®ISTRAR; shall register the "http://jabber.org/protocol/url-data/scheme/http" namespace.