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

HEAD requests generate 404 even if resource exists #908

Closed
ipolevoy opened this issue Dec 7, 2018 · 2 comments
Closed

HEAD requests generate 404 even if resource exists #908

ipolevoy opened this issue Dec 7, 2018 · 2 comments
Labels

Comments

@ipolevoy
Copy link
Member

ipolevoy commented Dec 7, 2018

selection_001758

@ipolevoy
Copy link
Member Author

ipolevoy commented Dec 7, 2018

See:

https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

9.4 HEAD
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification.

The response to a HEAD request MAY be cacheable in the sense that the information contained in the response MAY be used to update a previously cached entity from that resource. If the new field values indicate that the cached entity differs from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or Last-Modified), then the cache MUST treat the cache entry as stale.

@ipolevoy ipolevoy transferred this issue from javalite/activeweb Sep 30, 2019
@ipolevoy
Copy link
Member Author

Actually, the controller did not have a @HEAD annotation, so responding with 404 was appropriate

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

1 participant