Bug 793829 (JBEPP-904)

Summary: No Content-Type on css files
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: Thomas Heute <theute>
Component: unspecifiedAssignee: hfnukal <hfnukal>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: epp-bugs
Target Milestone: ---   
Target Release: 5.1.1.DEV01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-904
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-28 11:50:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Thomas Heute 2011-04-27 09:43:14 UTC
Help Desk Ticket Reference: https://na7.salesforce.com/500A00000079pW6
project_key: JBEPP

Comment 1 Thomas Heute 2011-04-27 09:43:35 UTC
Link: Added: This issue is related to GTNPORTAL-1804


Comment 2 Martin Weiler 2011-04-27 11:10:12 UTC
Help Desk Ticket Reference: Added: https://na7.salesforce.com/500A00000079pW6


Comment 3 hfnukal@redhat.com 2011-04-28 11:50:35 UTC
Release Notes Docs Status: Added: Documented as Known Issue
Release Notes Text: Added: EPP didn't set content-type on css-files added via gatein-resources.xml. This is important, beacuse IE9 ignores these css-files due to new security policy. In the console it states: SEC7113: CSS was ignored due to mime type mismatch.


Comment 4 Scott Mumford 2011-04-29 02:22:36 UTC
Release Notes Text: Removed: EPP didn't set content-type on css-files added via gatein-resources.xml. This is important, beacuse IE9 ignores these css-files due to new security policy. In the console it states: SEC7113: CSS was ignored due to mime type mismatch. Added: Cause: EPP doesn't set content-type on css-files added via gatein-resources.xml.
Consequence: This means IE9 ignores these css-files due to new security policy. In the console it states: SEC7113: CSS was ignored due to mime type mismatch. 
Workaround: Add the following setContentType code to the CSS portion of the ResourceRequestFilter.java file:
....
   if (uri.endsWith(".css"))
      {
         final OutputStream out = response.getOutputStream();
         // New code start
         httpResponse.setContentType("text/css; charset=UTF-8");
         // New code end
         final BinaryOutput output = new BinaryOutput()
         {
            public Charset getCharset()
            {
               return UTF_8;
            }
  ....
Result: Content-types will be set and IE9 will render the Portal as expected.


Comment 5 Scott Mumford 2011-05-03 04:08:30 UTC
Release Notes Docs Status: Removed: Documented as Known Issue Added: Documented as Resolved Issue
Release Notes Text: Removed: Cause: EPP doesn't set content-type on css-files added via gatein-resources.xml.
Consequence: This means IE9 ignores these css-files due to new security policy. In the console it states: SEC7113: CSS was ignored due to mime type mismatch. 
Workaround: Add the following setContentType code to the CSS portion of the ResourceRequestFilter.java file:
....
   if (uri.endsWith(".css"))
      {
         final OutputStream out = response.getOutputStream();
         // New code start
         httpResponse.setContentType("text/css; charset=UTF-8");
         // New code end
         final BinaryOutput output = new BinaryOutput()
         {
            public Charset getCharset()
            {
               return UTF_8;
            }
  ....
Result: Content-types will be set and IE9 will render the Portal as expected. Added: Cause: EPP doesn't set content-type on css-files added via gatein-resources.xml.
Consequence: This means IE9 ignores these css-files due to new security policy. In the console it states: SEC7113: CSS was ignored due to mime type mismatch. 
Fix: The ResourceRequestFilter.java file has been modified to set the content type.
Result: Content-types will be set and IE9 will render the Portal as expected.


Comment 6 Scott Mumford 2011-05-04 04:21:29 UTC
Release Notes Text: Removed: Cause: EPP doesn't set content-type on css-files added via gatein-resources.xml.
Consequence: This means IE9 ignores these css-files due to new security policy. In the console it states: SEC7113: CSS was ignored due to mime type mismatch. 
Fix: The ResourceRequestFilter.java file has been modified to set the content type.
Result: Content-types will be set and IE9 will render the Portal as expected. Added: JBoss Enterprise Portal Platform doesn't set content-type on css-files added via gatein-resources.xml. This causes Internet Explorer 9 to ignore these css-files due to new security policy (a console message states: SEC7113: CSS was ignored due to mime type mismatch). The ResourceRequestFilter.java file has been modified to set the content type so that content-types will be set and Internet Explorer 9 will render the Portal as expected.