Commit 3c0d7031 authored by 张永's avatar 张永

空值参与签名

parent ddbe93eb
......@@ -283,15 +283,16 @@ public class HttpUtil {
Object val = parameters.get(key);
String sKey = String.valueOf(key);
Object[] sVals = (val == null ? null : (val instanceof Object[] ? (Object[]) val : (val instanceof Collection<?> ? ((Collection<?>)val).toArray() : new Object[] { val })));
if (sVals != null && sVals.length > 0) {
for (Object sVal : sVals) {
if(StringUtil.isNotEmpty(sVal)) {
params.add(sKey + "=" +sVal);
} else {
params.add(sKey + "="); //空值 参与签名 字节跳动
}
}
} else {
params.add(sKey + "="); //空值 参与签名 字节跳动
}
}
}
}
return StringUtil.join("&", params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment