This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new c632e37 Fix BZ 65921 - type sets content-type for response not request c632e37 is described below commit c632e37100dd2c0b97a8a469800b5b9bc8ee3d65 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Mar 1 13:02:52 2022 +0000 Fix BZ 65921 - type sets content-type for response not request https://bz.apache.org/bugzilla/show_bug.cgi?id=65921 --- java/org/apache/catalina/valves/rewrite/RewriteValve.java | 2 +- webapps/docs/changelog.xml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java b/java/org/apache/catalina/valves/rewrite/RewriteValve.java index 459214a..53f8fc8 100644 --- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java +++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java @@ -445,7 +445,7 @@ public class RewriteValve extends ValveBase { // - content type (note: this will not force the content type, use a filter // to do that) if (rule.isType() && newtest != null) { - request.setContentType(rule.getTypeValue()); + response.setContentType(rule.getTypeValue()); } // Control flow processing diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index a4e90f3..c747b30 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,15 @@ issues do not "pop up" wrt. others). --> <section name="Tomcat 9.0.60 (remm)" rtext="in development"> + <subsection name="Catalina"> + <changelog> + <fix> + <bug>65921</bug>: The <code>type</code> substitution flag for the + rewrite valve should set the content type for the response, not the + request. (markt) + </fix> + </changelog> + </subsection> <subsection name="Coyote"> <changelog> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org