url - Why the HTTP request is sent incorrectly? -


original url fragment: {<>"|?(1)20416lol

encoded url fragment:

<code>encodeuricomponent('{<>"|?(1)20416lol') -> %7b%3c%3e%22%7c%3f(1)20416lol</code> 

but http request goes url.

screenshot

check out moz dev network site on encodeuricomponent

do following overwrite default encodeuricomponent function.

function fixedencodeuricomponent (str) {   return encodeuricomponent(str).replace(/[!'()*\|]/g, function(c) {     return '%' + c.charcodeat(0).tostring(16);   }) } 

Comments