Author: chabotc
Date: Sun Sep 20 21:27:02 2009
New Revision: 817105

URL: http://svn.apache.org/viewvc?rev=817105&view=rev
Log:
Re-adding the Content-Disposition to the makeRequest handler, and making it 
dependent on the debug setting wether it will be output or not (to make 
debugging this all easier)

Modified:
    incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php
    incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php

Modified: incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php?rev=817105&r1=817104&r2=817105&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php Sun Sep 20 
21:27:02 2009
@@ -62,6 +62,10 @@
       // only set caching headers if the result was 'OK'
       $this->setCachingHeaders();
     }
+    if (!Config::get('debug')) {
+      header('Content-Type: application/json; charset="UTF-8"');
+      header('Content-Disposition: attachment;filename=p.txt');
+    }
     echo $output;
   }
 }

Modified: incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php?rev=817105&r1=817104&r2=817105&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php Sun Sep 20 
21:27:02 2009
@@ -53,7 +53,7 @@
         $isShockwaveFlash = true;
       }
     }
-    if (! $isShockwaveFlash) {
+    if (! $isShockwaveFlash && !Config::get('debug')) {
       header('Content-Disposition: attachment;filename=p.txt');
     }
     $lastModified = $result->getResponseHeader('Last-Modified') != null ? 
$result->getResponseHeader('Last-Modified') : gmdate('D, d M Y H:i:s', 
$result->getCreated()) . ' GMT';


Reply via email to