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

Escape / in route parameter? #469

Open
ryanpcmcquen opened this issue Jul 18, 2018 · 2 comments
Open

Escape / in route parameter? #469

ryanpcmcquen opened this issue Jul 18, 2018 · 2 comments

Comments

@ryanpcmcquen
Copy link

ryanpcmcquen commented Jul 18, 2018

    "koa": "^2.2.0",
    "koa-bodyparser": "^4.2.0",
    "koa-router": "^7.2.0",

Code sample:

router
  .get(
    "/git/github/data/:username/:repo/:branch*/commit/:commitSha/path/:path*",
    github.data
  )
  .get("/git/github/info/:username/:repo/tree/:branch/:path*", github.info) // allow tree urls

https://github.com/codesandbox-app/codesandbox-importers/blob/master/packages/git-extractor/src/index.ts#L35

Expected Behavior:

That / would be escaped so that branches containing a / could be processed. Maybe it is just a syntax issue but I didn't see a similar use case in the README here.

Actual Behavior:

A 422 error is thrown.

@jbielick
Copy link
Collaborator

What URL are you requesting?

@ryanpcmcquen
Copy link
Author

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

2 participants