You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/01/03 03:21:24 UTC
[GitHub] jon-wei commented on a change in pull request #6761: Some fixes and
tests for spaces/non-ASCII chars in datasource names
jon-wei commented on a change in pull request #6761: Some fixes and tests for spaces/non-ASCII chars in datasource names
URL: https://github.com/apache/incubator-druid/pull/6761#discussion_r244906784
##########
File path: core/src/main/java/org/apache/druid/java/util/common/StringUtils.java
##########
@@ -153,10 +154,32 @@ public static String toUpperCase(String s)
return s.toUpperCase(Locale.ENGLISH);
}
+ @Nullable
public static String urlEncode(String s)
{
+ if (s == null) {
+ return null;
+ }
+
+ try {
+ // application/x-www-form-urlencoded encodes spaces as "+", but we use this to encode non-form
+ // data as well, so replace "+" with "%20".
Review comment:
Added this to method javadoc
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org