Skip to content

Commit

Permalink
Merge branch 'main' into SITES-28486
Browse files Browse the repository at this point in the history
  • Loading branch information
rbartl-pv authored Feb 6, 2025
2 parents a891bca + 9d8d19b commit b7e546b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ protected void activate(Configuration configuration) {
@Override
protected void doPost(@NotNull SlingHttpServletRequest request, @NotNull final SlingHttpServletResponse response)
throws ServletException, IOException {
// response will have content type text/html since it is represented by a JSP without another content type set
// JSPs have this content type by default
// So set this content type in advance inside response, in order to avoid breaking request dispatcher contract
// More info https://jakarta.ee/specifications/servlet/4.0/apidocs/javax/servlet/requestdispatcher#include-javax.servlet.ServletRequest-javax.servlet.ServletResponse-
response.setContentType("text/html");
formsHandlingServletHelper.doPost(request, response);
}

Expand Down

0 comments on commit b7e546b

Please sign in to comment.