MCPcopy Index your code
hub / github.com/API-Security/APIKit / parseCookie

Method parseCookie

src/main/java/burp/CookieManager.java:60–79  ·  view source on GitHub ↗
(String cookie)

Source from the content-addressed store, hash-verified

58 }
59
60 private HashMap<String, String> parseCookie(String cookie) {
61 HashMap<String, String> result = new HashMap<>();
62 String[] keyValuePairs = cookie.split(";");
63
64 for (String keyValuePair : keyValuePairs) {
65 keyValuePair = keyValuePair.trim();
66 String[] keyValue = keyValuePair.split("=", 2);
67
68 if ("".equals(keyValue[0])) {
69 continue; // 跳过空的 key
70 }
71
72 if (keyValue.length == 2) {
73 result.put(keyValue[0], keyValue[1]);
74 } else {
75 result.put(keyValue[0], "");
76 }
77 }
78 return result;
79 }
80
81 private String joinCookieKeyValue(HashMap<String, String> cookie) {
82 StringBuilder builder = new StringBuilder(new String());

Callers 1

processHttpMessageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected