Author: chabotc
Date: Wed Jul 16 14:40:50 2008
New Revision: 677439

URL: http://svn.apache.org/viewvc?rev=677439&view=rev
Log:
SHINDIG-454 return proxy responses as attachments

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

Modified: incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php?rev=677439&r1=677438&r2=677439&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php Wed Jul 16 
14:40:50 2008
@@ -170,6 +170,8 @@
                $status = (int)$result->getHttpCode();
                if ($status == 200) {
                        $headers = explode("\n", $result->getResponseHeaders());
+                       // Send the file as attachment
+                       $headers[] = 'Content-Disposition: attachment; 
filename=p.txt';
                        foreach ($headers as $header) {
                                if (strpos($header, ':')) {
                                        $key = trim(substr($header, 0, 
strpos($header, ':')));


Reply via email to