cstamas commented on a change in pull request #136: HTTPCLIENT-1968
URL: 
https://github.com/apache/httpcomponents-client/pull/136#discussion_r257453283
 
 

 ##########
 File path: httpclient/src/main/java/org/apache/http/client/utils/URIUtils.java
 ##########
 @@ -45,6 +46,51 @@
  */
 public class URIUtils {
 
+    /**
+     * Flags that control how URI is being rewritten.
+     *
+     * @since 5.7.8
+     */
+    public enum UriFlag {
+        DROP_FRAGMENT,
+        NORMALIZE
+    }
+
+    /**
+     * Empty set of uri flags.
+     *
+     * @since 5.7.8
+     */
+    public static final EnumSet<UriFlag> NO_FLAGS = 
EnumSet.noneOf(UriFlag.class);
+
+    /**
+     * Set of uri flags containing {@link UriFlag#DROP_FRAGMENT}.
+     *
+     * @since 5.7.8
+     */
+    public static final EnumSet<UriFlag> DROP_FRAGMENT = 
EnumSet.of(UriFlag.DROP_FRAGMENT);
+
+    /**
+     * Set of uri flags containing {@link UriFlag#NORMALIZE}.
+     *
+     * @since 5.7.8
+     */
+    public static final EnumSet<UriFlag> NORMALIZE = 
EnumSet.of(UriFlag.NORMALIZE);
+
+    /**
+     * Set of uri flags containing {@link UriFlag#DROP_FRAGMENT} and {@link 
UriFlag#NORMALIZE}.
+     *
+     * @since 5.7.8
+     */
+    public static final EnumSet<UriFlag> DROP_FRAGMENT_AND_NORMALIZE = 
EnumSet.of(UriFlag.DROP_FRAGMENT, UriFlag.NORMALIZE);
+
+    /**
+     * These uri flags are to be used in deprecated codebase only, and are set 
to mimic "legacy" behaviour.
+     *
+     * @since 5.7.8
+     */
+    public static final EnumSet<UriFlag> LEGACY_BEHAVIOR = 
DROP_FRAGMENT_AND_NORMALIZE;
 
 Review comment:
   Ack, dropped LEGACY_BEHAVIOUR, using DROP_FRAGMENT_AND_NORMALIZE instead.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to