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

Bertrand Delacretaz commented on SLING-10810:
---------------------------------------------

Digging a bit deeper, it looks like the behavior that I consider non-standard 
(ignoring setStatus instead of throwing an exception if the response is already 
committed) was introduced in 
[bc9696bd|https://github.com/apache/sling-org-apache-sling-engine/commit/bc9696bd4f52a3a2b50a19f2572b80a4ac2ea3a2]
 for SLING-7813.

I agree that your changes improve the situation but I regret not catching 
SLING-7813 at that time, I would have at least challenged the suggested new 
behavior.

However, It's been 3 years now so it looks like that's working.

> new status code should not be set if response is already comitted
> -----------------------------------------------------------------
>
>                 Key: SLING-10810
>                 URL: https://issues.apache.org/jira/browse/SLING-10810
>             Project: Sling
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: Engine 2.7.8
>            Reporter: Joerg Hoh
>            Assignee: Joerg Hoh
>            Priority: Major
>             Fix For: Engine 2.7.10
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> If the response is already committed, a new response should not be set, but 
> it should only be warned.
> Otherwise the status code logged in the Sling instance will taken from the 
> ResponseImpl object, which is different from the statuscode which is sent to 
> the client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to