diff --git a/src/main/java/org/jboss/netty/handler/codec/http/QueryStringDecoder.java b/src/main/java/org/jboss/netty/handler/codec/http/QueryStringDecoder.java index 01121c4d48..668b705c39 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/QueryStringDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/QueryStringDecoder.java @@ -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", " "); } diff --git a/src/main/java/org/jboss/netty/handler/codec/http/QueryStringEncoder.java b/src/main/java/org/jboss/netty/handler/codec/http/QueryStringEncoder.java index 5f81bfe7c1..8d6780d7d1 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/QueryStringEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/QueryStringEncoder.java @@ -67,6 +67,7 @@ public class QueryStringEncoder { } } + // FIXME Use URLEncoder or something equivalent private String replaceSpaces(String s) { return s.replaceAll(" ", "%20"); }