You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Ankit Agarwal (JIRA)" <ji...@apache.org> on 2016/08/03 09:22:20 UTC
[jira] [Commented] (SLING-5866) DefaultGetServlet obtains input
stream for binary even if request is a HEAD
[ https://issues.apache.org/jira/browse/SLING-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15405616#comment-15405616 ]
Ankit Agarwal commented on SLING-5866:
--------------------------------------
[~bdelacretaz] I have checked the integration tests mentioned at [0] with my changes and number of test case failures are same in trunk branch and my patch.
So it looks like attached pull request does not create any regression.
Also I have updated mentioned changes for HeadServletResponses.
Regarding test cases , As far as I can understand there no integration tests available for GET request as of now. So can we create a separate task for Test case of GET and HEAD requests and merge this patch for now ?
[0] https://github.com/apache/sling/tree/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets
> 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)