FIXMEs in HTTP QueryStringEncoder/Decoder
This commit is contained in:
parent
2b0ee3862f
commit
1ff2b7bbc9
@ -77,7 +77,7 @@ public class QueryStringDecoder {
|
|||||||
path = split[0];
|
path = split[0];
|
||||||
decodeParams(split[1]);
|
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) {
|
private void decodeParams(String s) {
|
||||||
String[] params = s.split("&");
|
String[] params = s.split("&");
|
||||||
for (String param : params) {
|
for (String param : params) {
|
||||||
@ -92,6 +92,7 @@ public class QueryStringDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME Use URLDecoder or something equivalent
|
||||||
private String removeSpaceDelimeters(String s) {
|
private String removeSpaceDelimeters(String s) {
|
||||||
return s.replaceAll("%20", " ");
|
return s.replaceAll("%20", " ");
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ public class QueryStringEncoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME Use URLEncoder or something equivalent
|
||||||
private String replaceSpaces(String s) {
|
private String replaceSpaces(String s) {
|
||||||
return s.replaceAll(" ", "%20");
|
return s.replaceAll(" ", "%20");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user