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

Allow empty URI path segments after the first #2404

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

Mahoney
Copy link
Collaborator

@Mahoney Mahoney commented Sep 29, 2023

RFC 3986 disallows an empty segment for the first segment of the path, but permits it in any remaining segments.

Jetty 9+ is stricter by default, disallowing all empty segments.

We can revert to the older behaviour, allowing more general mocking, by setting Jetty's UriCompliance to UNSAFE.

Submitter checklist

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected

@Mahoney Mahoney requested a review from a team as a code owner September 29, 2023 09:48
[RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.3)
disallows an empty segment for the _first_ segment of the path, but
permits it in any remaining segments.

Jetty 9+ is stricter by default, disallowing _all_ empty segments.

We can revert to the older behaviour, allowing more general mocking, by
setting Jetty's UriCompliance to UNSAFE.
@tomakehurst tomakehurst merged commit 650dac0 into master Oct 2, 2023
7 checks passed
@tomakehurst tomakehurst deleted the allow-empty-segments branch October 2, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants