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

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

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


Subject: [OASIS Issue Tracker] Updated: (ODATA-232) Enhance description of normalization procedures (public comment c201301e00001)


     [ http://tools.oasis-open.org/issues/browse/ODATA-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-232:
-----------------------------

    Proposal: 
After applying the three steps defined by RFC3986 the following four steps are performed:

4. Split query at "&" into query options, and each query option at the first "=" into query option name and query option value before percent-decoding
5. Percent-decode path segments, query option names, and query option values
6. Interpret path segments, query option names, and query option values according to OData rules

One of these rules is that single quotes within string literals are represented as two consecutive single quotes.

Valid URLs:
~/People('O''Neil')
~/People(%27O%27%27Neil%27)
~/People%28%27O%27%27Neil%27%29
~/OperatingSystems('OS%2F2')

Invalid URLs:
~/People('O%27Neil')
~/OperatingSystems('OS/2')

  was:
After applying the three steps defined by RFC3986 the following four steps are performed:

4. Split query at "&" into query options, and each query option at the first "=" into query option name and query option value before percent-decoding
5. Percent-decode path segments, query option names, and query option values
6. Interpret path segments, query option names, and query option values according to OData rules

One of these rules is that single quotes within string literals are represented as two consecutive single quotes.


> Enhance description of normalization procedures (public comment c201301e00001)
> ------------------------------------------------------------------------------
>
>                 Key: ODATA-232
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-232
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData ABNF Construction Rules
>    Affects Versions: V4.0_WD01
>         Environment: [Proposed]
>            Reporter: Stefan Drees
>            Priority: Minor
>             Fix For: V4.0_WD01
>
>
> The public comment [c201301e00001](https://lists.oasis-open.org/archives/odata-comment/201301/msg00001.html) with title "Query String parsing in URIs" indicates, that the description of  normalization procedures in the ABNF Construction Rules can be enhanced.
> RFC3986 defines three sets of characters:
> - unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
> - gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
> - sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
> Only characters in these three sets MAY occur in URLs, all other characters MUST be percent-encoded.
> RFC3986 defines three steps for URL processing that MUST be performed before percent-decoding:
> 1. Split undecoded URL into components scheme, hier-part, query, and fragment at first ":", then first "?", and then first "#"
> 2. Split undecoded hier-part into authority and path: if hier-part starts with "//", then authority is everything after "//" and before the next "/" or the end of the string, and path is everything that remains (nothing or the next "/" and everything after it)
> 3. Split undecoded path into path segments at "/"
> RFC3986 allows that characters in the unreserved set MAY be percent-decoded at any time.
> RFC3986 does not specify how to split the query part into subcomponents, nor does it define how to split path segments into subcomponents, so OData needs to define how these are split into OData-specific subcomponents, especially whether this happens before or after percent-decoding characters in the gen-delims and sub-delims sets.
> As pointed out in the public comment we have two areas that require special care:
> - Splitting queries into name-value dictionaries by first splitting at "&" and then splitting at the first "=" in each part
> - Treatment of the single quote character "'" within string literals
> The first is a widely used convention supported by URL parsing tools, and it would be nice to reuse them. These tools also typically percent-decode the parts remaining after the "&"/"=" splits before handing them back.
> The second is made especially interesting by the fact that Firefox always percent-encodes the single quote as %27.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


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