myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3621] branches/packs/app/controllers/resources_c


From: noreply
Subject: [myexperiment-hackers] [3621] branches/packs/app/controllers/resources_controller.rb: GET requests to a RODL proxy will now redirect to the proxy target
Date: Wed, 21 Aug 2013 13:37:14 +0000 (UTC)

Revision
3621
Author
dgc
Date
2013-08-21 13:37:13 +0000 (Wed, 21 Aug 2013)

Log Message

GET requests to a RODL proxy will now redirect to the proxy target

Modified Paths

Diff

Modified: branches/packs/app/controllers/resources_controller.rb (3620 => 3621)


--- branches/packs/app/controllers/resources_controller.rb	2013-08-13 13:11:01 UTC (rev 3620)
+++ branches/packs/app/controllers/resources_controller.rb	2013-08-21 13:37:13 UTC (rev 3621)
@@ -60,7 +60,13 @@
       return
     end
 
-    send_data(resource.content_blob.data, :type => resource.content_type)
+    # FIXME: This needs to support 406 
+
+    if resource.is_proxy
+      redirect_to resource.proxy_for.uri.to_s, :status => 303
+    else
+      send_data(resource.content_blob.data, :type => resource.content_type)
+    end
   end
 
   def post

reply via email to

[Prev in Thread] Current Thread [Next in Thread]