[ 
https://issues.apache.org/jira/browse/TAPESTRY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krzysztof Krzeminski updated TAPESTRY-2504:
-------------------------------------------

    Attachment: MissingCharsetBetter.patch

This way seems to complex for tapestry framework users.

I suggest to provide 3 constructors:

TextStreamResponse(String contentType, String text)                             
                                              - compatibility with existing 
clients
TextStreamResponse(String contentType, String charset, String text)             
                                   - gives way to specify response encoding
TextStreamResponse(MetaDataLocator locator, ComponentResources resources, 
String text) - for mixin and component developers

See attachent: MissingCharsetBetter.patch contains solution

> Unspecified ajax stream response encoding
> -----------------------------------------
>
>                 Key: TAPESTRY-2504
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2504
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 5.0.13
>         Environment: windows, java 1.5
>            Reporter: Krzysztof Krzeminski
>             Fix For: unspecified
>
>         Attachments: MissingCharsetBetter.patch, MissingCharsetPatch.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Automcomplete response does not properly create  data stream
>  
> Class org.apache.tapestry5.util.TextStreamResponse:
>     public InputStream getStream() throws IOException
>     {
>         return new ByteArrayInputStream(text.getBytes());
>     }
> should be:
>     public InputStream getStream() throws IOException
>     {
>         byte[] bytes = text.getBytes(charset);
>         return new ByteArrayInputStream(bytes);
>     }
> charset : class field which holds valid charset:

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to