added quotes for parameters containing '|' (it may be used in http.nonProxyHosts property) to avoid treating this symbol as end of command

This commit is contained in:
nik
2011-12-29 14:29:31 +04:00
parent afee3d4c80
commit 2f563abc2c
@@ -369,7 +369,7 @@ public class ParametersList implements Cloneable {
try {
builder.append(parameter);
StringUtil.escapeQuotes(builder);
if (builder.length() == 0 || StringUtil.indexOf(builder, ' ') >= 0) {
if (builder.length() == 0 || StringUtil.indexOf(builder, ' ') >= 0 || StringUtil.indexOf(builder, '|') >= 0) {
StringUtil.quote(builder);
}
return builder.toString();