bdelacretaz commented on a change in pull request #20:
URL:
https://github.com/apache/sling-org-apache-sling-engine/pull/20#discussion_r708185659
##########
File path:
src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
##########
@@ -150,11 +150,12 @@ public void setStatus(final int sc, final String msg) {
LOG.warn("Response already committed. Failed to set status
code from {} to {}. {}",
getStatus(), sc, explanation);
}
- }
- if (msg == null) {
- super.setStatus(sc);
- } else {
- super.setStatus(sc, msg);
+ } else { // response is not yet committed, so the statuscode can be
changed
Review comment:
You are right, I missed that and was looking at the sendError method, at
https://javaee.github.io/javaee-spec/javadocs/javax/servlet/http/HttpServletResponse.html#sendError-int-java.lang.String-
So fine with me to omit the suggested comment and I'll update my notes at
SLING-7813
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]