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

Avoid double qs parsing? #947

Closed
rauchg opened this issue Feb 1, 2017 · 0 comments
Closed

Avoid double qs parsing? #947

rauchg opened this issue Feb 1, 2017 · 0 comments
Assignees

Comments

@rauchg
Copy link
Member

rauchg commented Feb 1, 2017

  createServer((req, res) => {
    const { pathname, query } = parse(req.url, true)

    if (pathname === '/a') {
      app.render(req, res, '/b', query)
    } else if (pathname === '/b') {
      app.render(req, res, '/a', query)
    } else {
      handle(req, res)
    }
  })

I think handle should admit query as a param to avoid double-parsing?

@rauchg rauchg added the good first issue Easy to fix issues, good for newcomers label Feb 1, 2017
@timneutkens timneutkens self-assigned this Feb 1, 2017
@timneutkens timneutkens added Status: In Progress and removed good first issue Easy to fix issues, good for newcomers Status: In Progress labels Feb 1, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants