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

Route name without a beginning / works for everything except static resources #1084

Open
ArthurS1 opened this issue Mar 25, 2024 · 4 comments

Comments

@ArthurS1
Copy link
Contributor

Behavior :

"/static" bind static(Classpath("static"))

Responds as expected when requesting "/static/somefile.css", however :

"static" bind static(Classpath("static"))

Responds with a 404

Expected behavior

I would have expected any route with no beginning / to be valid, since the following responds as expected.

"ping" bind Method.GET to InitialiseRequestContext(contexts)
    .then(BearerAuth(credentials, ::checkCredentials))
    .then { Response(Status.OK).body("pong") },

http4k version 5.13.8.0

Am I missing something ?

@s4nchez
Copy link
Collaborator

s4nchez commented Mar 27, 2024

Hi @ArthurS1 thank you for reporting this. I've had a look and can reproduce it. We'll look for a fix soon, unless you'd like to have a try and submit a PR for it.

@ArthurS1
Copy link
Contributor Author

ArthurS1 commented Apr 6, 2024

Hey, I will take care of it if you have not started already.

@daviddenton
Copy link
Member

Go for it! 🙃

ArthurS1 added a commit to ArthurS1/http4k that referenced this issue Apr 12, 2024
@daviddenton
Copy link
Member

Fixed in next version :)

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

No branches or pull requests

3 participants