You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2009/11/11 11:24:39 UTC
[jira] Commented: (SLING-1180) Add default HEAD servlet
[ https://issues.apache.org/jira/browse/SLING-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776404#action_12776404 ]
Alexander Klimetschek commented on SLING-1180:
----------------------------------------------
This acts as a wrapper, and will forward to the normal GET servlet/script for the resource, simply ignoring the response body, right? Sounds good to me.
I suggest to improve the javadoc, currently it says "A SlingSafeMethodsServlet that renders the current Resource as simple HTML", but it actually doesn't return any html at all.
> Add default HEAD servlet
> ------------------------
>
> Key: SLING-1180
> URL: https://issues.apache.org/jira/browse/SLING-1180
> Project: Sling
> Issue Type: New Feature
> Components: Servlets
> Affects Versions: Servlets Get 2.0.6
> Reporter: Felix Meschberger
> Fix For: Servlets Get 2.0.8
>
> Attachments: SLING-1180.patch
>
>
> RFC 2616 states: "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response."
> Currently Sling has no out-of-the-box support for handling HEAD requests and thus most HEAD requests will (in a default Sling installation) be handled by WebDAV servlet which handles all requests not handled by any other servlet/script.
> I suggest we add a DefaultHeadServlet which handles HEAD requests as follows:
> * wrap the response dropping any output (null writer/outputstream)
> * wrap request overwriting the getMethod() method simulating a GET request
> * forward the request to the request resource
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.