Index: google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java =================================================================== --- a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java @@ -20,8 +20,9 @@ * construction. * *
- * For details on escaping URIs for use in web pages, see section 2.4 of RFC 3986. + * For details on escaping URIs for use in web pages, see RFC 3986 - section 2.4 and RFC 3986 - appendix A * *
* When encoding a String, the following rules apply: @@ -50,8 +51,9 @@ * *
* Note: This escaper produces uppercase hexadecimal sequences. From RFC 3986:
"URI producers and normalizers
- * should use uppercase hexadecimal digits for all percent-encodings."
+ * href="http://tools.ietf.org/html/rfc3986">RFC 3986:
+ * "URI producers and normalizers should use uppercase hexadecimal digits for all
+ * percent-encodings."
*
* @since 1.0
*/
@@ -69,6 +71,15 @@
public static final String SAFEPATHCHARS_URLENCODER = "-_.!~*'()@:$&,;=";
/**
+ * A string of characters that do not need to be encoded when used in URI user info part, as
+ * specified in RFC 3986. Note that some of these characters do need to be escaped when used in
+ * other parts of the URI.
+ *
+ * @since 1.15
+ */
+ public static final String SAFEUSERINFOCHARS_URLENCODER = "-_.!~*'():$&,;=";
+
+ /**
* A string of characters that do not need to be encoded when used in URI query strings, as
* specified in RFC 3986. Note that some of these characters do need to be escaped when used in
* other parts of the URI.