Bug 779210 (SOA-1603) - admin-console's HTTP response contains invalid charset header value "charset=UTF-8;charset=UTF-8"
Summary: admin-console's HTTP response contains invalid charset header value "charset=...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1603
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: Monitoring and Management
Version: 5.0.0 ER3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.0.0 GA,5.0.0 ER4
Assignee: Julian Coleman
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-16 15:23 UTC by Pavel Macik
Modified: 2010-01-19 09:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-19 09:48:29 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-1603 0 Major Closed admin-console's HTTP response contains invalid charset header value "charset=UTF-8;charset=UTF-8" 2017-08-02 18:27:07 UTC

Description Pavel Macik 2009-11-16 15:23:45 UTC
Date of First Response: 2009-11-16 11:35:46
project_key: SOA

The admin-console's ( http://localhost:8080/admin-console ) HTTP response contains following headers:

Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1, JSF/1.2
Content-Type: text/html; charset=UTF-8;charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 16 Nov 2009 14:57:52 GMT

200 OK

Notice the invalid (doubled) charset value of Content-Type header.


With this header it can cause following exception:
"java.nio.charset.IllegalCharsetNameException: UTF-8;charset=UTF-8"

Comment 1 Julian Coleman 2009-11-16 16:35:46 UTC
This is an issue with EAP 5.0 GA (or Seam).

To repeat:
  Install lynx.
  Start up EAP 5.0.0 GA.
  Run:
    lynx -trace http://localhost:8080/admin-console/
  Press 'y' to accept the cookie.
  Press <return> to load http://localhost:8080/admin-console/index.seam
  In another terminal run:
    grep Content-Type $HOME/Lynx.trace
  Notice the line containing "text/html;charset=utf-8;charset=utf-8"


Comment 2 Julian Coleman 2009-11-16 16:53:15 UTC
A work around appears to be editing the following files:
  .../server/<profile>/deploy/admin-console.war/index.xhtml
  .../server/<profile>/deploy/admin-console.war/WEB-INF/facelets/layout.xhtml
  .../server/<profile>/deploy/admin-console.war/WEB-INF/facelets/errorLayout.xhtml
  .../server/<profile>/deploy/admin-console.war/login.xhtml

and changing the lines:
  <f:view contentType="text/html; charset=UTF-8">

to:
  <f:view contentType="text/html">

because "charset=utf-8" is being appended to the contentType line.



Comment 3 Julian Coleman 2009-11-16 17:00:25 UTC
The Seam guide, chapter 16, "Internationalization, localization and themes":
  http://docs.jboss.org/seam/2.1.2/reference/en-US/html/i18n.html
contains more information on setting the character encoding.


Comment 4 Julian Coleman 2009-11-18 10:00:21 UTC
Note, that RFC2045, section 5 "Content-Type Header Field" does not state that
parameters should not be duplicated.  So, it looks like a bug in the HTML parser
to reject the duplicated charset attribute and treat it as a single value of
"UTF-8;charset=UTF-8".


Comment 5 Julian Coleman 2009-11-18 10:17:39 UTC
Fixed in revision 4169 of:
  build-tools/builders/eap/post-patch/patch_admin_console_ui.xml
Commit message:
  SOA-1603
  Workaround for duplicated charset that confuses some clients.


Comment 6 Julian Coleman 2009-11-20 11:03:09 UTC
Link: Added: This issue is related to JBPAPP-3132


Comment 7 Pavel Macik 2010-01-19 09:48:30 UTC
Verified in ER4


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