-
-
Notifications
You must be signed in to change notification settings - Fork 719
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 HEAD requests to be served by fs::dir() filter #835
Conversation
How about the empty body for |
The underlying HTTP server (not sure if it's hyper or tower) does not sent the body when handling HEAD requests. This has already been done in the fs::file() filter: Lines 48 to 57 in 4a03710
|
Great. |
I think, yes it needs it, but this is already working due to the any() filter. I didn't want to use the any() filter for the fs:dir() as it appears cumbersome to respond to POST or PUT requests on static files. So I think we should also disable this on the fs:file() filter and use only get+head filter |
Do you mean this is working for your addition or do you mean this But yeah I'm also wondering in what cases we want to support |
the second option: I did not want to break someone else code!
:-) |
thanks @zenria! and thanks @joseluisq for the reviewing :)
yeah it's hyper, see here |
FYI this change actually broke some code when updating from 0.3.1 to 0.3.2. We had a custom handler for HEAD but relied on |
This is a fix for feature request #834