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

Client side getQuery() includes fragment identifers in parsed query parameters #938

Closed
edsonlo opened this issue Jun 20, 2017 · 1 comment
Assignees
Labels
bug An issue with the system

Comments

@edsonlo
Copy link

edsonlo commented Jun 20, 2017

Let's say you submit a url like http://www.domain.com/page?param1=xyz&param2=123#anchor. Calling getQuery() results in parameters {param1: "xyz", param2: "123#anchor"} when {param1: "xyz", param2: 123} is expected.

@gigabo
Copy link
Contributor

gigabo commented Jun 20, 2017

Nice find @edsonlo!

Looks like this is browser-side only. Likely here (in ClientRequest.js):

    getQuery() {
        var indexOfQuestion = this._url.indexOf("?");
        if (-1 === indexOfQuestion) {
            return {};
        }
        return decode(this._url.substring(indexOfQuestion + 1));
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the system
Projects
None yet
Development

No branches or pull requests

3 participants