[
https://issues.apache.org/jira/browse/SLING-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15391561#comment-15391561
]
Bertrand Delacretaz commented on SLING-5866:
--------------------------------------------
https://github.com/apache/sling/pull/156 looks mostly ok but I don't see any
test code in it.
Did you verify (and how) that your new code is executed by our current test
suite and doesn't introduce any regressions?
Otherwise we need unit or integration test code, feel free to ask our our dev
list if you need help in writing that.
Apart from that and unless that complicates think I'd like the
{{HeadServletResponse}} class to be in its own java file, and that might also
make it easier to test.
> 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)