From 6175fc49d4ab72a6fbe7a76f853bcfe456cc2e04 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Fri, 19 Sep 2014 20:06:22 +0200 Subject: [PATCH] Allow to access uri of QueryStringDecoder. Related to [#2896] Motivation: Sometimes it is useful to be able to access the uri that was used to initialize the QueryStringDecoder. Modifications: Add method which allows to retrieve the uri. Result: Allow to retrieve the uri that was used to create the QueryStringDecoder. --- .../io/netty/handler/codec/http/QueryStringDecoder.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringDecoder.java b/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringDecoder.java index 3a66633d4e..9ae6809e5b 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringDecoder.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringDecoder.java @@ -165,6 +165,13 @@ public class QueryStringDecoder { this.maxParams = maxParams; } + /** + * Returns the uri used to initialize this {@link QueryStringDecoder}. + */ + public String uri() { + return uri; + } + /** * Returns the decoded path string of the URI. */