[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: ED07 Issue #1: Encoding of + in query parameters
In his feedback on ED06, Gabe suggested we add an example of HXRI query parameter encoding rules. To do so I broke the encoding rules into a separate subsection in ED07. That entire subsection is included below for reference.
The issue that came up doing this, however, is that in rule #3 below, while we give unambiguous instructions that the character + and the percent-encoded sequence %2B MUST be interpreted as the same character, we don’t currently say anything about whether the + character SHOULD or SHOULD NOT be encoded as %2B.
And thus it is not clear what to do with the + characters that appear in the example.
So the open issue is: what additional instructions about + character encoding, if any, should we put in rule #3 below?
To conform with the requirements of HTTP(S) URI processors, the following rules MUST be applied to encode HXRI query parameters prior to input and decode them prior to output. Decoding MUST be performed prior any comparison operation defined in this specification.
1. Any occurrences of the character & within an input parameter (specifically the Service Type value) MUST be percent encoded using the sequence %26.
2. If an HXRI query parameter includes one of the media type parameters defined in Table 6, it MUST be delimited from the HXRI query parameter with a semicolon, and this semicolon MUST be percent-encoded using the sequence %3B. This prevents misinterpretation of the semicolon character by a proxy resolver.
3. In an HXRI query parameter, the character + and the percent-encoded sequence %2B MUST be interpreted as the same character, therefore spaces in an HXRI query parameter MUST NOT be encoded as + signs.
4. Any XRIs or IRIs used as values of HXRI query parameters MUST be in URI-normal form as defined in [XRISyntax].
Following is an example HXRI before application of these encoding rules, with the characters requiring encoding highlighted in red.
Here is the HXRI after application of the encoding rules, with the encoding highlighted in red.