Revision: 922
          http://stripes.svn.sourceforge.net/stripes/?rev=922&view=rev
Author:   bengunter
Date:     2008-05-21 08:34:46 -0700 (Wed, 21 May 2008)

Log Message:
-----------
Fixed STS-570. Patch submitted by Ville Skytt?\195?\164.

Modified Paths:
--------------
    trunk/stripes/src/net/sourceforge/stripes/action/StreamingResolution.java

Modified: 
trunk/stripes/src/net/sourceforge/stripes/action/StreamingResolution.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/action/StreamingResolution.java   
2008-05-21 13:51:14 UTC (rev 921)
+++ trunk/stripes/src/net/sourceforge/stripes/action/StreamingResolution.java   
2008-05-21 15:34:46 UTC (rev 922)
@@ -136,7 +136,7 @@
      * Once the InputStream or Reader signaled the end of the stream, close() 
is called on it.
      *
      * @param request the HttpServletRequest being processed
-     * @param response the paired HttpServletReponse
+     * @param response the paired HttpServletResponse
      * @throws IOException if there is a problem accessing one of the streams 
or reader/writer
      *         objects used.
      */
@@ -146,7 +146,10 @@
 
         // If a filename was specified, set the appropriate header
         if (this.filename != null) {
-            response.setHeader("Content-disposition", "attachment; filename=" 
+ this.filename);
+            // Value of filename should be RFC 2047 encoded here (see RFC 
2616) but few browsers
+            // support that, so just escape the quote for now
+            String escaped = this.filename.replace("\"", "\\\"");
+            response.setHeader("Content-Disposition", "attachment; 
filename=\"" + escaped + "\"");
         }
 
         stream(response);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to