*) Bugfix: httpdFileHandler.java did not handle filenames with encoded chars correctly

See: http://www.yacy-forum.de/viewtopic.php?t=2265

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2036 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent a10072b5c0
commit cd4aeffea2

@ -84,9 +84,11 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PushbackInputStream;
import java.io.UnsupportedEncodingException;
import java.lang.ref.SoftReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URLDecoder;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Date;
@ -300,6 +302,14 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
return;
}
// url decoding of path
try {
path = URLDecoder.decode(path, "UTF-8");
} catch (UnsupportedEncodingException e) {
// This should never occur
assert(false) : "UnsupportedEncodingException: " + e.getMessage();
}
// check permission/granted access
String authorization = (String) requestHeader.get(httpHeader.AUTHORIZATION);
String adminAccountBase64MD5 = switchboard.getConfig("adminAccountBase64MD5", "");

Loading…
Cancel
Save