Commit a34164c1 by 罗长华

修改sdk签名请求头date名称

parent e269851f
...@@ -22,8 +22,6 @@ public class SignUtils { ...@@ -22,8 +22,6 @@ public class SignUtils {
public static final String CONTENT_TYPE = "Content-Type"; public static final String CONTENT_TYPE = "Content-Type";
public static final String DATE = "Date";
public static final String NEW_LINE = "\n"; public static final String NEW_LINE = "\n";
public static String buildCanonicalString(String method, String resourcePath, Map<String, String> headers, Map<String, String> parameters) { public static String buildCanonicalString(String method, String resourcePath, Map<String, String> headers, Map<String, String> parameters) {
...@@ -37,8 +35,7 @@ public class SignUtils { ...@@ -37,8 +35,7 @@ public class SignUtils {
for (Map.Entry<String, String> header : headers.entrySet()) { for (Map.Entry<String, String> header : headers.entrySet()) {
if (header.getKey() != null) { if (header.getKey() != null) {
String lowerKey = header.getKey().toLowerCase(); String lowerKey = header.getKey().toLowerCase();
if (lowerKey.equals(CONTENT_TYPE.toLowerCase()) if (lowerKey.equals(CONTENT_TYPE.toLowerCase())) {
|| lowerKey.equals(DATE.toLowerCase())) {
fixedHeadersToSign.put(lowerKey, header.getValue().trim()); fixedHeadersToSign.put(lowerKey, header.getValue().trim());
} else if (lowerKey.startsWith(IM_PREFIX)) { } else if (lowerKey.startsWith(IM_PREFIX)) {
canonicalizedImHeadersToSign.put(lowerKey, header.getValue().trim()); canonicalizedImHeadersToSign.put(lowerKey, header.getValue().trim());
......
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