-
Notifications
You must be signed in to change notification settings - Fork 19
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
HEAD Request Directives not processing when transparent-head-requests on #27
Comments
Also, is this the right repository for this bug report? I assumed it was since the setting is |
Nope, this is a very old legacy repository :) This is also not a bug. As you quoted yourself, transparently-handled HEAD requests are dispatched to your application as GET requests. That's what this feature is all about. In the example, you need to react to GET requests to |
So, in summary, with |
I was surprised because while I expected the transparent GET requests, I didn't think that it would result in the |
But isn't the tests passing no matter the setting (even with sealedRoutes) kind of misleading? |
That's because tests built with the testkit are executed without spray-can and so transparent-head-request handling isn't available. I agree that this is unfortunate as it prevents proper testing of the behavior. |
I assume that there's no way currently to somehow bring that handling into scope in some way while doing tests? Short of actually running a spray-can instance and performing real HTTP requests against it. It's not a big deal, since it does make sense now that you've explained that the transparent head requests replaces the Or some better-worded version of that. I'm sure it's not a typical use case to have a resource support HEAD and not GET so maybe it's not neccesary. But on the other hand, the inability to test that is, as you say, unfortunate. |
Hello!
I think I may have found a bug when dealing with HEAD requests to spray-can. The documentation states:
But it doesn't say that the
head
directives won't be processed as all when the setting ison
. I've made an example repository with instructions on how to reproduce what I see as an error or undocumented "feature" hereThe steps to reproduce are in the README file in the linked example. Is this the expected behavior? If so, where is it documented?
The text was updated successfully, but these errors were encountered: