Author: bombe
Date: 2008-06-05 11:58:48 +0000 (Thu, 05 Jun 2008)
New Revision: 20214

Modified:
   trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
Log:
allow content type override when using a parameter to specify the URI to get

Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2008-06-05 
10:55:43 UTC (rev 20213)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2008-06-05 
11:58:48 UTC (rev 20214)
@@ -336,7 +336,12 @@
                                }

                                if(logMINOR) Logger.minor(this, "Redirecting to 
FreenetURI: "+newURI);
-                               headers.put("Location", "/"+newURI);
+                               String type = httprequest.getParam("type");
+                               if (type != null) {
+                                       headers.put("Location", "/"+newURI + 
"?type=" + type);
+                               } else {
+                                       headers.put("Location", "/"+newURI);
+                               }
                                ctx.sendReplyHeaders(302, "Found", headers, 
null, 0);
                                return;
                        }


Reply via email to