[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: New secion
I don’t know how well the following text will survive
the trip through the TC email list, but I’m posting it so that TC members
can review this new section (it will be section 11.4 in ED07) containing all
the HXRI encoding rules. Please take 3-4 minutes to read it over and post back if you
see any changes or corrections that need to be made. Thanks, =Drummond HXRI Encoding Rules
To
conform with the requirements of the URI parsing libraries typically used by HTTP(S)
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. 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 precise 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/ 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/ |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]