-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
RegEx using greedy qualifier for N times is quoted incorrectly #676
Comments
ruir6o
changed the title
Regex using greedy qualifier for N times is quoted incorrectly
RegEx using greedy qualifier for N times is quoted incorrectly
Nov 18, 2021
daviddenton
added a commit
that referenced
this issue
Nov 26, 2021
Thanks for the report. It looks like a tricky one to solve TBH (Regexes 🙄 ). I've added a failing test anyway here |
@daviddenton I think a simple custom parser could do the trick. I've created a simple PR (#678) to showcase this. |
ruir6o
added a commit
to ruir6o/http4k
that referenced
this issue
Nov 28, 2021
Replaces the UriTemplate logic by a custom parser that handles complex reguler expressions (i.e. regular expressions that contain the delimiters for the path parameters). Issue-Id: http4k#676
ruir6o
added a commit
to ruir6o/http4k
that referenced
this issue
Nov 28, 2021
Replaces the UriTemplate logic by a custom parser that handles complex regular expressions (i.e. regular expressions that contain the delimiters for the path parameters). Issue-Id: http4k#676
ruir6o
added a commit
to ruir6o/http4k
that referenced
this issue
Nov 28, 2021
Replaces the UriTemplate logic by a custom parser that handles complex regular expressions (i.e. regular expressions that contain the delimiters for the path parameters). Issue-Id: http4k#676
Closed
Same problem, there are some solution to fix it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have just found out about
http4k
and I decided to create a simple service with it. My very first attempt at getting a path parameter to be validated against a UUID RegEx is failing however. This is how I've defined the RegEx:And it is put in a router by using
However running the application yields:
Looking at the exception it seems like
http4k
is replacing the{
and}
in an attempt to quote literal path segments, however it is applying it to the regex section as well, interfering with the greedy qualifiers defined in the UUID RegEx.The text was updated successfully, but these errors were encountered: