You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2009/11/11 08:54:39 UTC

[jira] Created: (SLING-1180) Add default HEAD servlet

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


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.


[jira] Closed: (SLING-1180) Add default HEAD servlet

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-1180.
-----------------------------------


> 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
>            Assignee: 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.


[jira] Commented: (SLING-1180) Add default HEAD servlet

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Resolved: (SLING-1180) Add default HEAD servlet

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-1180.
--------------------------------------

    Resolution: Fixed

Committed a slightly modified version (mainly JavaDoc) in Rev. 889389

> 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
>            Assignee: 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.


[jira] Assigned: (SLING-1180) Add default HEAD servlet

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-1180:
----------------------------------------

    Assignee: Felix Meschberger

> 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
>            Assignee: 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.


[jira] Commented: (SLING-1180) Add default HEAD servlet

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776424#action_12776424 ] 

Felix Meschberger commented on SLING-1180:
------------------------------------------

Yes, and yes ;-) Thanks.

> 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.


[jira] Updated: (SLING-1180) Add default HEAD servlet

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-1180:
-------------------------------------

    Attachment: SLING-1180.patch

Proposed implementation

> 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.