You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by jo...@apache.org on 2009/11/10 02:47:37 UTC

svn commit: r834299 - /incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ProxyBase.java

Author: johnh
Date: Tue Nov 10 01:47:37 2009
New Revision: 834299

URL: http://svn.apache.org/viewvc?rev=834299&view=rev
Log:
Don't emit Content-Disposition header for HttpServletResponses about to be emitted with Content-Type: application/x-shockwave-flash. This takes into account rewriteMime logic as well as original-response Content-Type headers.


Modified:
    incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ProxyBase.java

Modified: incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ProxyBase.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ProxyBase.java?rev=834299&r1=834298&r2=834299&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ProxyBase.java (original)
+++ incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ProxyBase.java Tue Nov 10 01:47:37 2009
@@ -137,7 +137,8 @@
     // We're skipping the content disposition header for flash due to an issue with Flash player 10
     // This does make some sites a higher value phishing target, but this can be mitigated by
     // additional referer checks.
-    if (!"application/x-shockwave-flash".equalsIgnoreCase(results.getHeader("Content-Type"))) {
+    if (!"application/x-shockwave-flash".equalsIgnoreCase(results.getHeader("Content-Type")) &&
+        !"application/x-shockwave-flash".equalsIgnoreCase(response.getContentType())) {
       response.setHeader("Content-Disposition", "attachment;filename=p.txt");
     }
     if (results.getHeader("Content-Type") == null) {