[
https://issues.apache.org/jira/browse/SLING-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15385811#comment-15385811
]
ASF GitHub Bot commented on SLING-5866:
---------------------------------------
GitHub user anagarwa opened a pull request:
https://github.com/apache/sling/pull/156
SLING-5866 DefaultGetServlet obtains input stream for binary even if …
…request is a HEAD
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/anagarwa/sling SLING-5866
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/156.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #156
----
commit e6e5e52bf552e6808b36a9966dbda5181da015a4
Author: Ankit Agarwal <[email protected]>
Date: 2016-07-20T10:05:43Z
SLING-5866 DefaultGetServlet obtains input stream for binary even if
request is a HEAD
----
> 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)