Wrong encoding of special characters in URL query component
While consuming HttpClient from os core common library, we found that some special characters in URL query component are not properly encoded, 1 example of that is +
(the plus symbol).
According to RFC 2396, it is a reserved character in query component so it is not encoded when forming the url, however, if we encode it explicitly before constructing the URL by using library, the escape character %
would be treated as a non-reserved character in query component which leads to double-encoding issue for +
symbol.
As a result, if we send +
as plain text, library forms the url as it is, if we encode +
to %2B
before sending it to library, it comes out as %252B
, neither of them represents the original url when it arrives at server side.