Michael Osipov created DISPL-674:
------------------------------------
Summary: BufferedResponseWrapper implementation does not adhere to
servlet specs regarding content type setting
Key: DISPL-674
URL: https://jira.codehaus.org/browse/DISPL-674
Project: DisplayTag
Issue Type: Bug
Components: Export
Affects Versions: 1.2
Reporter: Michael Osipov
Attachments: DISPL-674.patch
org.displaytag.filter.BufferedResponseWrapper13Impl.setCharacterEncoding(String)
stupidly sets the content type without handling the char encoding correct. The
specs of javax.servlet.ServletResponse.setContentType(String) clearly says:
{quote}
* Sets the content type of the response being sent to
* the client, if the response has not been committed yet.
* The given content type may include a character encoding
* specification, for example, <code>text/html;charset=UTF-8</code>.
* The response's character encoding is only set from the given
* content type if this method is called before <code>getWriter</code>
* is called.
* <p>This method may be called repeatedly to change content type and
* character encoding.
* This method has no effect if called after the response
* has been committed. It does not set the response's character
* encoding if it is called after <code>getWriter</code>
* has been called or after the response has been committed.
* <p>Containers must communicate the content type and the character
* encoding used for the servlet response's writer to the client if
* the protocol provides a way for doing so. In the case of HTTP,
* the <code>Content-Type</code> header is used.
{quote}
Tomcat's repsonse implementation does this clearly. This impl does not. I have
patched the issue. Now it works as specified. This one is related to DISPL-471.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel