- added decode of UTF-16 escapes in url-arguments (%u0123), bugfix for http://www.yacy-forum.de/viewtopic.php?t=2762

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3083 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
karlchenofhell 18 years ago
parent 782db9099d
commit 6118fb73ec

@ -767,8 +767,15 @@ public final class httpd implements serverHandler {
baos.write(' ');
pos++;
} else if (s.charAt(pos) == '%') {
baos.write(Integer.parseInt(s.substring(pos + 1, pos + 3), 16));
pos += 3;
// start change by [FB]: added UTF-escapes
if (s.charAt(pos + 1) == 'u') { // UTF-16 escape
pos += 6;
baos.write(Integer.parseInt(s.substring(pos + 2, pos + 6), 16));
} else { // normal escape
pos += 3;
baos.write(Integer.parseInt(s.substring(pos + 1, pos + 3), 16));
}
// end change by [FB]
} else {
baos.write(s.charAt(pos++));
}

Loading…
Cancel
Save