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

Request for head-route does not work if AutoHeadResponse is installed #1835

Open
MikeMitterer opened this issue Apr 29, 2020 · 2 comments
Open
Labels

Comments

@MikeMitterer
Copy link

Ktor Version and Engine Used (client or server and name)
1.3.2

Describe the bug
head route does not resolve as expected

To Reproduce
install(AutoHeadResponse)

     route("/api") {
            head("/v1") {
                call.respond(HttpStatusCode.NoContent)
            }
        }

curl -I http://0.0.0.0:8080/api/v1 fails with 404

Expected behavior
curl should see a 204

I found out that this happens only if AutoHeadResponse is installed - I'm not sure if this is expected behaviour or not but at least it should be documented

@dmitrievanthony
Copy link
Contributor

Hi @MikeMitterer, I prepared the fix. Currently, it's on review.

@oleg-larshin
Copy link

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants