[ 
https://issues.apache.org/jira/browse/SLING-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15405720#comment-15405720
 ] 

Bertrand Delacretaz commented on SLING-5866:
--------------------------------------------

bq. there are no integration tests available for GET request as of now.

The GET servlet is certainly tested, indirectly, by many of the 
{{launchpad/integration-tests}}.

It looks like we didn't have HEAD tests, I have added {{HeadServletTest}} for 
this [1]. 

Please verify that this still passes with your changes, or suggest test changes 
if needed ({{launchpad/integration-tests/README.txt}} has instructions on how 
to run specific tests from that test suite).

There's a minor thing that I missed at https://github.com/apache/sling/pull/156 
, the null tests are inverted between getWriter and getOutputStream, I have 
commented there.

[1] 
https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/HeadServletTest.java

> DefaultGetServlet obtains input stream for binary even if request is a HEAD
> ---------------------------------------------------------------------------
>
>                 Key: SLING-5866
>                 URL: https://issues.apache.org/jira/browse/SLING-5866
>             Project: Sling
>          Issue Type: Improvement
>          Components: Servlets
>    Affects Versions: Servlets Get 2.1.14
>            Reporter: Ankit Agarwal
>
> As per current implementation any HEAD request will be handled by 
> defaultHeadServlet which majorly does two changes
> 1.) coverts response output stream to be null so that there should be no 
> message body in response
> 2.)  coverts HEAD request to GET request. 
> Now this request is dispatched and served by defaultGetServlet.
> With this approach, we get the desired output but response is delayed as it 
> reads the complete binary data of a resource. and also it increases data 
> transfer which is not needed.
> So IMO this approach should be improved.
> thanks,



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to