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

Jetty 11.0.1 fails test with 400 - Ambiguous segment in URI (when this was previously 200) #13

Closed
rbygrave opened this issue Feb 28, 2021 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@rbygrave
Copy link
Contributor

rbygrave commented Feb 28, 2021

Refer jetty/jetty.project#6001

For jetty-10 and beyond, the default is changed to disallow all three. It is now configurable in a new UriCompliance class that can be set on HttpConfiguration

// RouteSplatTest

  @Test
  void when_utf8Encoded() {
    String path = URLEncoder.encode("java/kotlin", StandardCharsets.UTF_8)
      + "/two/" + URLEncoder.encode("x/y", StandardCharsets.UTF_8);

    HttpResponse<String> res = pair.request().path(path).get().asString();

    assertThat(res.body()).isEqualTo("splats:[java/kotlin, x/y]");
    assertThat(res.statusCode()).isEqualTo(200);
  }
@rbygrave
Copy link
Contributor Author

The point being that URL encoding of / makes it ambiguous and that isn't allowed by default with Jetty 11.0.1+

At this point from a Jex perspective this is fine. If people are requiring the old behavior they would need to configure Jetty via UriCompliance back to the legacy behavior.

Summary

In summary, we will change the Jex test and move forward with the default jetty 11.0.1 behavior as the expected behavior.

@rbygrave rbygrave added this to the 1.3 milestone Feb 28, 2021
@rbygrave rbygrave self-assigned this Feb 28, 2021
@rbygrave rbygrave added the documentation Improvements or additions to documentation label Feb 28, 2021
rbygrave added a commit that referenced this issue Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant