Bug 793829 (JBEPP-904) - No Content-Type on css files
Summary: No Content-Type on css files
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-904
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: unspecified
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.1.1.DEV01
Assignee: hfnukal@redhat.com
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-27 09:43 UTC by Thomas Heute
Modified: 2012-02-28 16:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-28 11:50:35 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEPP-904 0 None None None Never

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.



Note You need to log in before you can comment on or make changes to this bug.