You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Krzysztof (JIRA)" <de...@tapestry.apache.org> on 2008/07/07 14:25:32 UTC
[jira] Created: (TAPESTRY-2504) Unspecified ajax stream response
encoding
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
Fix For: unspecified
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2504) Unspecified ajax stream response
encoding
Posted by "Krzysztof Krzeminski (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krzysztof Krzeminski updated TAPESTRY-2504:
-------------------------------------------
Attachment: MissingCharsetPatch.patch
problem 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: 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-2504) Unspecified ajax stream response
encoding
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-2504.
------------------------------------------
Resolution: Fixed
Fix Version/s: (was: unspecified)
5.0.14
Assignee: Howard M. Lewis Ship
TAPESTRY-2543 is now more explicit that the application-wide charset is used for all JSON and markup output.
> 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
> Assignee: Howard M. Lewis Ship
> Fix For: 5.0.14
>
> 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-2504) Unspecified ajax stream response
encoding
Posted by "Igor Drobiazko (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612281#action_12612281 ]
Igor Drobiazko commented on TAPESTRY-2504:
------------------------------------------
Thanks for the patch. I was also thinking about to use the MetaDataLocator service inside TextStreamResponse.
public TextStreamResponse(MetaDataLocator locator, ComponentResources resources, String text)
{
this.contentType = locator.findMeta(MetaDataConstants.RESPONSE_CONTENT_TYPE, resources, String.class);
this.encoding = locator.findMeta(MetaDataConstants.RESPONSE_ENCODING, resources, String.class);
this.text = text;
}
This way we can reuse the metadata provided by a component in the containment hierarchy.
Comments are welcome, please.
> 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: 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2504) Unspecified ajax stream response
encoding
Posted by "Krzysztof Krzeminski (JIRA)" <de...@tapestry.apache.org>.
[ 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org