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 743875e5b8..94d2715923 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 @@ -30,9 +30,11 @@ import org.jboss.netty.util.CharsetUtil; * Splits an HTTP query string into a path string and key-value parameter pairs. * This decoder is for one time use only. Create a new instance for each URI: *
- * {@link QueryStringDecoder} decoder = new {@link QueryStringDecoder}("/hello?recipient=world"); + * {@link QueryStringDecoder} decoder = new {@link QueryStringDecoder}("/hello?recipient=world&x=1;y=2"); * assert decoder.getPath().equals("/hello"); * assert decoder.getParameters().get("recipient").equals("world"); + * assert decoder.getParameters().get("x").equals("1"); + * assert decoder.getParameters().get("y").equals("2"); ** * @author The Netty Project @@ -73,7 +75,8 @@ public class QueryStringDecoder { throw new NullPointerException("charset"); } - this.uri = uri; + // http://en.wikipedia.org/wiki/Query_string + this.uri = uri.replace(';', '&'); this.charset = charset; } @@ -97,7 +100,8 @@ public class QueryStringDecoder { throw new NullPointerException("charset"); } - this.uri = uri.toASCIIString(); + // http://en.wikipedia.org/wiki/Query_string + this.uri = uri.toASCIIString().replace(';', '&'); this.charset = charset; }