|
|
|
@ -20,6 +20,7 @@ package com.tencent.cloud.metadata.core;
|
|
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import com.tencent.cloud.common.constant.MetadataConstant;
|
|
|
|
@ -67,7 +68,8 @@ public class EncodeTransferMedataScgFilter implements GlobalFilter, Ordered {
|
|
|
|
|
if (!CollectionUtils.isEmpty(customMetadata)) {
|
|
|
|
|
String metadataStr = JacksonUtils.serialize2Json(customMetadata);
|
|
|
|
|
try {
|
|
|
|
|
builder.header(MetadataConstant.HeaderName.CUSTOM_METADATA, URLEncoder.encode(metadataStr, "UTF-8"));
|
|
|
|
|
builder.header(MetadataConstant.HeaderName.CUSTOM_METADATA,
|
|
|
|
|
URLEncoder.encode(metadataStr, StandardCharsets.UTF_8.name()));
|
|
|
|
|
}
|
|
|
|
|
catch (UnsupportedEncodingException e) {
|
|
|
|
|
builder.header(MetadataConstant.HeaderName.CUSTOM_METADATA, metadataStr);
|
|
|
|
|