Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First query-string parameter in url incorrectly parsed? #11

Open
rb1147x opened this issue Jul 18, 2016 · 0 comments
Open

First query-string parameter in url incorrectly parsed? #11

rb1147x opened this issue Jul 18, 2016 · 0 comments

Comments

@rb1147x
Copy link

rb1147x commented Jul 18, 2016

Hello,

It appears that neko.Web.getParamsString() incorrectly parses the first query-string parameter.

Given a URL: http://mywebsite.com/index.n?test=1&test2=323 the result shows below:

Hello from Tora!
Main.hx:9: {test2 => 323, q => /tora/test/index.ntest=1}

If this URL is used: http://mywebsite.com/index.n?&test=1&test2=323 (notice the & in front of the first query-string) the result shows correct:

Hello from Tora!
Main.hx:9: {test => 1, test2 => 323, q => /tora/test/index.n}

I don't think I've ever seen an initial & after the ?, but just to double check I referenced https://en.wikipedia.org/wiki/Query_string, which shows no need for a ? on the first query string.

The code used:

class Main {

    static function main() {

        Sys.println("Hello from Tora!");
        trace(neko.Web.getParamsString());

    }
}

Thanks!

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

No branches or pull requests

1 participant