Index: java/org/apache/catalina/connector/Response.java =================================================================== --- java/org/apache/catalina/connector/Response.java (revision 1851921) +++ java/org/apache/catalina/connector/Response.java (working copy) @@ -758,9 +758,17 @@ return; } - getCoyoteResponse().setContentTypeNoCharset(m[0]); - if (m[1] != null) { + if (m[1] == null) { + // No charset and we know value is valid as cache lookup was + // successful + // Pass-through user provided value in case user-agent is buggy and + // requires specific format + getCoyoteResponse().setContentTypeNoCharset(type); + } else { + // There is a charset so have to rebuild content-type without it + getCoyoteResponse().setContentTypeNoCharset(m[0]); + // Ignore charset if getWriter() has already been called if (!usingWriter) { try { Index: java/org/apache/coyote/Response.java =================================================================== --- java/org/apache/coyote/Response.java (revision 1851921) +++ java/org/apache/coyote/Response.java (working copy) @@ -541,7 +541,14 @@ String charsetValue = m.getCharset(); - if (charsetValue != null) { + if (charsetValue == null) { + // No charset and we know value is valid as parser was successful + // Pass-through user provided value in case user-agent is buggy and + // requires specific format + this.contentType = type; + } else { + // There is a charset so have to rebuild content-type without it + this.contentType = m.toStringNoCharset(); charsetValue = charsetValue.trim(); if (charsetValue.length() > 0) { try { Index: test/org/apache/coyote/TestResponse.java =================================================================== --- test/org/apache/coyote/TestResponse.java (revision 1851985) +++ test/org/apache/coyote/TestResponse.java (working copy) @@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletResponse; import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; import org.apache.catalina.Context; @@ -87,7 +86,6 @@ } - @Ignore // Disabled until Bug 62912 is addressed @Test public void testContentTypeWithoutSpace() throws Exception { doTestContentTypeSpacing(false);