Author: bombe
Date: 2008-06-16 17:46:10 +0000 (Mon, 16 Jun 2008)
New Revision: 20377
Modified:
trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
Log:
fix #2436
Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java 2008-06-16
17:29:27 UTC (rev 20376)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java 2008-06-16
17:46:10 UTC (rev 20377)
@@ -301,7 +301,7 @@
int bufProgress = 0;
while(offset < buf.length) {
byte b = buf[offset];
- if((int)b == (int)find.charAt(bufProgress)) {
+ if(b == find.charAt(bufProgress)) {
bufProgress++;
if(bufProgress == find.length()) return true;
} else {
@@ -337,7 +337,7 @@
if(logMINOR) Logger.minor(this, "Redirecting to
FreenetURI: "+newURI);
String type = httprequest.getParam("type");
- if (type != null) {
+ if ((type != null) && (type.length() > 0)) {
headers.put("Location", "/"+newURI +
"?type=" + type);
} else {
headers.put("Location", "/"+newURI);