OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xri message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Resend of new section


IGNORE THAT LAST MESSAGE. I found one error myself. Please review the following instead:

 

HXRI Encoding Rules

To conform with the requirements of the URI parsing libraries typically used by web servers, HXRIs MUST be encoded prior to input and decoded prior to output following the precise sequence of steps specified in this section. In addition, all decoding steps MUST be performed prior any comparison operation defined in this specification. Because web server libraries will typically perform some of these decoding functions automatically, proxy resolver implementers MUST ensure that their implementation, when used in conjunction with the web server of their choice, accomplishes the full set of decoding steps.

Following is the sequence of encoding steps:

1.       First, the QXRI portion of the HXRI, including all HXRI query parameters, MUST be transformed into URI-normal form as defined in section 2.3 of [XRISyntax]. This means characters not allowed in URIs, such as SPACE, or characters that are valid only in IRIs, such as UCS characters outside the URI valid set, MUST be percent encoded. Also, the plus sign character (“+”) MUST NOT be used to encode the SPACE character because in decoding the percent-encoded sequence %2B MUST be interpreted as the plus sign character (“+”).

2.       Second, in order to preserve percent-encoding when the HXRI is passed through a web server, all percent signs MUST be themselves percent-encoded, i.e., a SPACE encoded as %20 would become %2520. This step is not idempotent, so it MUST be performed only once.

3.       Third, any occurrences of the ampersand character (“&”) within an HXRI query parameter that are NOT used to delimit it from another query parameter MUST be percent encoded using the sequence %26. This prevents misinterpretation of HXRI query parameters by a proxy resolver.

4.       Fourth, any semicolon used to delimit one of the media type parameters defined in Table 6 from the media type value MUST be percent-encoded using the sequence %3B. This prevents misinterpretation of the semicolon character by a Web server.

The decoding steps are the exact inverse of the encoding steps. Again, note that step 2 above is not idempotent, so it must be performed only once during decoding.

Following is an example HXRI before application of these encoding rules, with the characters requiring encoding highlighted in red.

https://xri.example.com/=example*name/path?query&_xrd_r=application/
xrds+xml;https=true;sep=true;refs=true&_xrd_t=http://example.org/
test?a=1&b=2&string=hello%20plan
te&_xrd_m=application/atom+xml

Here is the HXRI after application of the encoding rules, with the encoding highlighted in red.

https://xri.example.com/=example*name/path?query&_xrd_r=application/
xrds+xml%3Bhttps=true%3Bsep=true%3Brefs=true&_xrd_t=http://example.org/test?a=1%26b=2%26string=hello%2520plan
%25E9te&_xrd_m=application/atom+xml

 




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]