FIXMEs in HTTP QueryStringEncoder/Decoder

This commit is contained in:
Trustin Lee 2008-11-26 08:44:39 +00:00
parent 2b0ee3862f
commit 1ff2b7bbc9
2 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,7 @@ public class QueryStringDecoder {
path = split[0];
decodeParams(split[1]);
}
//todo - just replacing spaces at the minute, should we check for all characters or leave this to the user?
private void decodeParams(String s) {
String[] params = s.split("&");
for (String param : params) {
@ -92,6 +92,7 @@ public class QueryStringDecoder {
}
}
// FIXME Use URLDecoder or something equivalent
private String removeSpaceDelimeters(String s) {
return s.replaceAll("%20", " ");
}

View File

@ -67,6 +67,7 @@ public class QueryStringEncoder {
}
}
// FIXME Use URLEncoder or something equivalent
private String replaceSpaces(String s) {
return s.replaceAll(" ", "%20");
}