> If I read this correctly, than given what you write, the current
`URI.encode_query/1` implementation _is_ in violation of RFC3986. Example:

You can’t compare the result of URI.encode with URI.encode_query because
they are meant to escape different parts of an URI and different parts use
different rules. They are both in accordance to the RFC though.

The assumption that all of a URL needs to be escaped with URI.encode is
incorrect. if we encode a query parameter with URI.encode, that will be the
wrong result.

Plus, the Wikipedia article explicitly mentions that escaping space as + is
a difference to RFC3986, which confirms my assumption that RFC3986 does not
mention whitespace *in query params* should be encoded as +:

> The encoding of SPACE as '+' and the selection of "as-is" characters
distinguishes this encoding from RFC 3986
<https://tools.ietf.org/html/rfc3986>.

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2Bq3FZ-ymfxK_V5Sef7biVK_pF71d2e2_AvhNrHNr61OA%40mail.gmail.com.

Reply via email to