Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

When using url encoded object in query parameters the route is not recognized #354

Closed
gensenio opened this issue Jul 31, 2020 · 5 comments
Closed
Assignees

Comments

@gensenio
Copy link

gensenio commented Jul 31, 2020

Im using this simple example to reproduce the issue:

require_once __DIR__ . '/vendor/autoload.php';
use Siler\Functional as λ; // Just to be cool, don't use non-ASCII identifiers ;)
use Siler\Route;

Route\get('/test', λ\puts('Hello World'));

I serve it using php -S localhost:8888 -t .

Calling
http://localhost:8888/test?filters%5Bstate%5D=2
doesn't works anymore in version 1.7.3 (the route is not recognized).
It was working until version 1.7.2.

http://localhost:8888/test?filters[state]=2
works.

@leocavalcante
Copy link
Owner

Thank you for reporting!
Fixed at v1.7.4
More details at siler-examples/issue-354

@gensenio
Copy link
Author

This is the fastest bug fix i remember to date!
Thank you!

@charlyschulte
Copy link

charlyschulte commented Feb 24, 2021

i have the same problem, when i call a route with an url encoded javascript string (f5iOhq-XT4uibHCTuuANfC%3AAPA91bFzj682Kr_JcCiBhRHRdODtQftZnPUyntq6gf9oy1So0j5Ry4GFjwHWheJJcZynfKdDo3j4E4YXnoJMEZBif6fw5PInCzL46FGcl8EsZJgzfYJmDCIPNB8nFC5lJhVA8W73_rPY)
i didnt get a route. the problem seems to be the "%3A".
would be really nice, if i could use encodeURIComponent ;)

thank you really much

@leocavalcante
Copy link
Owner

Hi @charlyschulte, can you please open a new issue sharing more details and if possible an example snippet?

@charlyschulte
Copy link

charlyschulte commented Feb 24, 2021

yes, no problem: #584

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants