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

Vert.x Web routes with '+' in fragment are not resolved #431

Closed
Jotschi opened this issue Aug 11, 2016 · 3 comments
Closed

Vert.x Web routes with '+' in fragment are not resolved #431

Jotschi opened this issue Aug 11, 2016 · 3 comments

Comments

@Jotschi
Copy link
Contributor

Jotschi commented Aug 11, 2016

Version

  • vert.x web: 3.3.2 and 3.4.0-SNAPSHOT @ 0bd69d5

Context

Routes which include a plus sign character ('+') are not resolved.
RFC3986 states that a URI fragment may contain pchar which in turn is defined as:

  pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"

And subdelims contains '+'

  sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
                 / "*" / "+" / "," / ";" / "="

Do you have a reproducer?

Test case for RouterTest class:

  @Test
  public void testGetWithPlusPath() throws Exception {
    router.get("/some+path/").handler(rc -> {
      rc.response().setStatusMessage("foo").end();
    });
    testRequest(HttpMethod.GET, "/some+path/", 200, "foo");
  }

Steps to reproduce

  1. Add route which includes the '+' character in the route segment
  2. Invoke request to URL
@Jotschi
Copy link
Contributor Author

Jotschi commented Aug 11, 2016

@luengnat
Copy link

@Jotschi even when "normalisePath" is turned off, the pattern matching is still wrong since if you have a pattern router.get("/:param1"), it match /albert+einstein as { param1: "albert einstein" } while in fact "+" should not be unescaped.

@pmlopes
Copy link
Member

pmlopes commented Aug 30, 2016

This issue has been superseded by #443

@pmlopes pmlopes closed this as completed Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants