[Issue 15382] std.uri has an incorrect set of reserved characters

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Apr 7 22:39:23 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15382

Eugene Wissner <belka at caraus.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |belka at caraus.de

--- Comment #1 from Eugene Wissner <belka at caraus.de> ---
Look at "2.4.  When to Encode or Decode":
"the only time when octets within a URI are percent-encoded is during the
process of producing the URI from its component parts.  This is when an
implementation determines which of the reserved characters are to be used as
subcomponent delimiters and which can be safely used as data."

So reserved characters can be encoded but it isn't a must. Only characters used
as delimiters in a particular URL scheme must be encoded. Wikipedia differs
between reserved characters with or without reserved meaning.
I tested it quickly in Firefox and Firefox doesn't seem to encode characters
like * or ().
The behavior of encodeComponent is actually exactly the same as
encodeURIComponent from JavaScript. The behavior described in the issue, is how
PHP urlencode works, that encodes all reserved characters.

--


More information about the Digitalmars-d-bugs mailing list