[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-1539) Clarify decoding of plus character in URLs
Ralf Handl created ODATA-1539: --------------------------------- Summary: Clarify decoding of plus character in URLs Key: ODATA-1539 URL: https://issues.oasis-open.org/browse/ODATA-1539 Project: OASIS Open Data Protocol (OData) TC Issue Type: Improvement Components: URL Conventions Affects Versions: V4.01_OS Reporter: Ralf Handl Fix For: V4.01_ERRATA01 OData URL is based onÂ[RFC3986|https://www.rfc-editor.org/rfc/rfc3986.html], which inÂ[Section 2.1 Percent-Encoding|https://www.rfc-editor.org/rfc/rfc3986.html#section-2.1] explicitly defines {{%20}} as the encoding for space. Unfortunately RFC3986 is less clear on the encoding of the plus ({{+}}) character:Â[Section 2.2 Reserved Characters|https://www.rfc-editor.org/rfc/rfc3986.html#section-2.2]Ârecommends {{%2B}} as the encoding for plus âunless [â] specifically allowed by the URI scheme to represent data in that componentâ. As a consequence, many URL-encoding tools, and the most commonly used browsers (Chrome, Edge, Firefox) do not percent-encode the plus character and retain it as a plus character. To make matters really confusing theÂ[WhatWG URL|https://url.spec.whatwg.org/]Âspecification defines an API for manipulating URLs that - depending on how it is used - will encode space as theÂthe plus ({{+}}) character: {code:js} var x = new URL("http://foo?bar=a+b c") x.href // --> http://foo/?bar=a+b%20c var y = new URL("http://foo") y.searchParams.append("bar","a+b c") y.href // --> http://foo/?bar=a%2Bb+c {code}  This raises the question on how an OData service SHOULD / MUST interpret the plus ({{+}}) character in a URL: * does it mean plus, * or does it mean space? Note: the percent-encoded variants are unambiguous: * {{%20}} means space * {{%2B}} means plus    -- This message was sent by Atlassian Jira (v8.3.3#803004)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]