mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
refactor(metadata): improve parameter handling in MetadataController for improved key processing
This commit is contained in:
+10
-1
@@ -111,7 +111,16 @@ public class MetadataController {
|
||||
|
||||
Map<String, String> rawParams = new LinkedHashMap<>();
|
||||
if (request.getAllRequestParams() != null) {
|
||||
rawParams.putAll(request.getAllRequestParams());
|
||||
for (Entry<String, String> entry : request.getAllRequestParams().entrySet()) {
|
||||
String paramName = entry.getKey();
|
||||
String paramValue = entry.getValue();
|
||||
Matcher bracketMatcher = BRACKET_PARAM_PATTERN.matcher(paramName);
|
||||
if (bracketMatcher.matches()) {
|
||||
rawParams.put(bracketMatcher.group(1), paramValue);
|
||||
} else if (!STANDARD_KEYS.contains(paramName.toLowerCase(Locale.ROOT))) {
|
||||
rawParams.put(paramName, paramValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (servletRequest != null) {
|
||||
Map<String, String[]> parameterMap = servletRequest.getParameterMap();
|
||||
|
||||
Reference in New Issue
Block a user