DispachRenderResponse/DispatchServletResponse does not detect content type if
space is present
----------------------------------------------------------------------------------------------
Key: TRINIDAD-819
URL: https://issues.apache.org/jira/browse/TRINIDAD-819
Project: MyFaces Trinidad
Issue Type: Bug
Environment: Java 6, windows and linux
Reporter: Victor S.
Priority: Minor
DispachRenderResponse/DispatchServletResponse (in package
org.apache.myfaces.trinidadinternal.config.dispatch) does not detect the
correct content type if a space exists before character encoding declaration
(i.e. "application/xhtml+xml; charset=ISO-8859-1").
The current Pattern is:
static private final Pattern _CONTENT_TYPE_PATTERN =
Pattern.compile("([^;]+)(?:;charset=(.*))?");
I think it must be:
static private final Pattern _CONTENT_TYPE_PATTERN =
Pattern.compile("([^;]+)(?:;\\s*?charset=(.*))?");
A workaround exists: removing white spaces between media type" and parameters
(i.e. in "<[EMAIL PROTECTED] contentType" directive).
Is not there (both classes) common code which is possible to extract?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.