You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Don Brown (JIRA)" <ji...@apache.org> on 2006/06/11 02:12:16 UTC
[jira] Resolved: (WW-826) IncludeTag use FastByteArrayOutputStream
to write the content may bring invalid character.
[ http://issues.apache.org/struts/browse/WW-826?page=all ]
Don Brown resolved WW-826:
--------------------------
Fix Version: (was: 2.0.0)
Resolution: Not A Problem
I agree - I don't see how splitting a character into two buffers would matter since when written out, the character would be reconstituted. Please reopen if I'm missing something.
> IncludeTag use FastByteArrayOutputStream to write the content may bring invalid character.
> ------------------------------------------------------------------------------------------
>
> Key: WW-826
> URL: http://issues.apache.org/struts/browse/WW-826
> Project: Struts Action 2
> Type: Bug
> Versions: WW 2.1.7
> Environment: tomcat5,windows or linux
> Reporter: fog
>
> method of FastByteArrayOutputStream:
> public void writeTo(JspWriter out, String encoding) throws IOException {
> // Check if we have a list of buffers
> if (buffers != null) {
> Iterator iter = buffers.iterator();
> while (iter.hasNext()) {
> byte[] bytes = (byte[]) iter.next();
> if (encoding != null) {
> out.write(new String(bytes, encoding));
> } else {
> out.write(new String(bytes));
> }
> }
> }
> // write the internal buffer directly
> if (encoding != null) {
> out.write(new String(buffer, 0, index, encoding));
> } else {
> out.write(new String(buffer, 0, index));
> }
> }
> because blocksize is constant,a character may be separated into two buffer
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira