Closed lroolle closed 11 months ago
Hey @lroolle we cannot use the URL
object to parse query parameters because it doesn't support receiving multiple parameters with the same name, used in arrays
That was why you could fix the unit tests in your pr
here is a little example of what i'm talking
params = new URL('https://localhost?p_string=%2B+%2B&p_string=another').searchParams
params.get('p_string')
It prints only + +
ehre it should have printed ['+ +', 'another']
I will take a look into the issue you are having and solve it in the next release
Hey @lroolle i've pushed a new release (v1.0.1) that fixes your problem
Hey @lroolle i've pushed a new release (v1.0.1) that fixes your problem
thx, hey I've just take a short review of your fixing. It appears that multiple parameters with the same name might not be an issue. I've only heard that some form parameters may use this format?
I spotted an inconsistency in how we decode query parameters, especially around the
+
character. Here's a quick breakdown:In Python:
In JS:
Versions:
What I did:
URL
object'ssearchParams
for the extraction of query parameters.The solution is from: Cloudflare community post.