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

Fix: avoid matching capture pattern name ( Fixes #291) #301

Merged
merged 7 commits into from
Dec 23, 2023

Conversation

jfraudeau
Copy link
Contributor

@jfraudeau jfraudeau commented Sep 20, 2023

As stated in the issue #291, GET /test/:capture would match a capture defined as get "/test/:capture" _handler with the capture absent from params.

With this fix the param would be set to literally ":capture

@jfraudeau jfraudeau changed the title Fix: avoid matching capture pattern name ( #291) Fix: avoid matching capture pattern name ( Fixes #291) Sep 20, 2023
@ocramz
Copy link
Collaborator

ocramz commented Sep 23, 2023

Thank you @jfraudeau ! Could you please add a test for this as well?

@jfraudeau
Copy link
Contributor Author

Test added @ocramz thanks for your time

@ocramz ocramz self-requested a review October 28, 2023 08:55
@ocramz ocramz marked this pull request as draft October 28, 2023 08:55
@ocramz ocramz marked this pull request as ready for review October 28, 2023 08:55
Copy link
Collaborator

@ocramz ocramz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, but I don't think the implemented behaviour is correct, see comments on the test.

test/Web/ScottySpec.hs Outdated Show resolved Hide resolved
test/Web/ScottySpec.hs Show resolved Hide resolved
Copy link
Collaborator

@ocramz ocramz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for taking so long @jfraudeau , would you mind adding a changelog entry for this as well? Thank you!

@ocramz
Copy link
Collaborator

ocramz commented Dec 17, 2023

Oh and please fix the conflict in the test files. Thanks again!

@jfraudeau
Copy link
Contributor Author

All done, I hope the changelog entry is clear enough

Copy link
Collaborator

@ocramz ocramz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good thank you @jfraudeau ! 👍

@ocramz ocramz merged commit bddd9de into scotty-web:master Dec 23, 2023
6 checks passed
@jfraudeau jfraudeau deleted the fix-capture-name-match branch December 27, 2023 12:20
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

Successfully merging this pull request may close these issues.

2 participants