You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Ben Sommerville (JIRA)" <de...@tapestry.apache.org> on 2007/04/10 10:04:32 UTC
[jira] Created: (TAPESTRY-1409) Allow StreamResponse to specify
browser should save as file, rather than displaying in page.
Allow StreamResponse to specify browser should save as file, rather than displaying in page.
--------------------------------------------------------------------------------------------
Key: TAPESTRY-1409
URL: https://issues.apache.org/jira/browse/TAPESTRY-1409
Project: Tapestry
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.0.4
Reporter: Ben Sommerville
Priority: Minor
Currently responses rendered using StreamResponse will display within the browser (depending on content type).
Sometimes the application would like to be able to save the response as a file instead of displaying in the browser.
This can be implemented by setting the "content-disposition" header in the response.
--
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-1409) Allow StreamResponse to specify
browser should save as file, rather than displaying in page.
Posted by "Ben Sommerville (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ben Sommerville updated TAPESTRY-1409:
--------------------------------------
Attachment: TAP-1409_2.patch
Original patch added explicit asAttachment & getFilename methods to StreamResponse. This worked but was a little specific. I had been thinking of splitting those methods into a separate interface but Howard's approach is much simpler & more elegant.
New patch adds prepareResponse method to StreamResponse.as per Howard's approach.
> Allow StreamResponse to specify browser should save as file, rather than displaying in page.
> --------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1409
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1409
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Ben Sommerville
> Priority: Minor
> Attachments: TAP-1409.patch, TAP-1409_2.patch
>
>
> Currently responses rendered using StreamResponse will display within the browser (depending on content type).
> Sometimes the application would like to be able to save the response as a file instead of displaying in the browser.
> This can be implemented by setting the "content-disposition" header in the response.
--
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-1409) Allow StreamResponse to specify
browser should save as file, rather than displaying in page.
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499159 ]
Howard M. Lewis Ship commented on TAPESTRY-1409:
------------------------------------------------
I haven't looked at the patch yet, but I think the right approach will be to extend StreamResponse with a new method:
void prepareResponse(Response response);
And make sure Response includes the necessary setHeader() methods. This will give the StreamResponse implementation the chance to set any headers it wants before the bytestream is sent down.
To some degree, having the getContentType() method is uncessary (the SR impl could set the content type), but since its so likely that an implementation wouldn't otherwise know to set the content type, I feel it is worth leaving unchanged.
> Allow StreamResponse to specify browser should save as file, rather than displaying in page.
> --------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1409
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1409
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Ben Sommerville
> Priority: Minor
> Attachments: TAP-1409.patch
>
>
> Currently responses rendered using StreamResponse will display within the browser (depending on content type).
> Sometimes the application would like to be able to save the response as a file instead of displaying in the browser.
> This can be implemented by setting the "content-disposition" header in the response.
--
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-1409) Extend StreamResponse to support
setting headers in the Response prior to streaming the contents from the
InputStream
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-1409.
------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.5
Great patch!
> Extend StreamResponse to support setting headers in the Response prior to streaming the contents from the InputStream
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1409
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1409
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Ben Sommerville
> Assignee: Howard M. Lewis Ship
> Priority: Minor
> Fix For: 5.0.5
>
> Attachments: TAP-1409.patch, TAP-1409_2.patch
>
>
> Currently responses rendered using StreamResponse will display within the browser (depending on content type).
> Sometimes the application would like to be able to save the response as a file instead of displaying in the browser.
> This can be implemented by setting the "content-disposition" header in the response.
--
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-1409) Extend StreamResponse to support
setting headers in the Response prior to streaming the contents from the
InputStream
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAPESTRY-1409:
-------------------------------------------
Summary: Extend StreamResponse to support setting headers in the Response prior to streaming the contents from the InputStream (was: Allow StreamResponse to specify browser should save as file, rather than displaying in page.)
> Extend StreamResponse to support setting headers in the Response prior to streaming the contents from the InputStream
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1409
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1409
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Ben Sommerville
> Assignee: Howard M. Lewis Ship
> Priority: Minor
> Attachments: TAP-1409.patch, TAP-1409_2.patch
>
>
> Currently responses rendered using StreamResponse will display within the browser (depending on content type).
> Sometimes the application would like to be able to save the response as a file instead of displaying in the browser.
> This can be implemented by setting the "content-disposition" header in the response.
--
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] Assigned: (TAPESTRY-1409) Allow StreamResponse to specify
browser should save as file, rather than displaying in page.
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAPESTRY-1409:
----------------------------------------------
Assignee: Howard M. Lewis Ship
> Allow StreamResponse to specify browser should save as file, rather than displaying in page.
> --------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1409
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1409
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Ben Sommerville
> Assignee: Howard M. Lewis Ship
> Priority: Minor
> Attachments: TAP-1409.patch, TAP-1409_2.patch
>
>
> Currently responses rendered using StreamResponse will display within the browser (depending on content type).
> Sometimes the application would like to be able to save the response as a file instead of displaying in the browser.
> This can be implemented by setting the "content-disposition" header in the response.
--
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-1409) Allow StreamResponse to specify
browser should save as file, rather than displaying in page.
Posted by "Ben Sommerville (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ben Sommerville updated TAPESTRY-1409:
--------------------------------------
Attachment: TAP-1409.patch
Patch to StreamResponse & associated classes to allow saving response as attachment.
Also adds setHeader, setIntHeader to Response interface.
> Allow StreamResponse to specify browser should save as file, rather than displaying in page.
> --------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1409
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1409
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Ben Sommerville
> Priority: Minor
> Attachments: TAP-1409.patch
>
>
> Currently responses rendered using StreamResponse will display within the browser (depending on content type).
> Sometimes the application would like to be able to save the response as a file instead of displaying in the browser.
> This can be implemented by setting the "content-disposition" header in the response.
--
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