spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.87k stars 2.44k forks source link

When @ RequestPart and @ RequestParam are used together, the @ RequestParam parameter will be duplicated #4286

Closed jackding79 closed 2 months ago

jackding79 commented 3 months ago
   for (Entry<String, String[]> entry : request.getParameterMap().entrySet()) {
            String key = entry.getKey();
            List<String> listOfAllParams = stream(request.getParameterMap().get(key))
                    .collect(Collectors.toList());
            List<String> listOfOnlyQueryParams = queryParamsGroupedByName.get(key);

            if (listOfOnlyQueryParams != null
                    && !listOfOnlyQueryParams.containsAll(listOfAllParams)) {
                listOfAllParams.removeAll(listOfOnlyQueryParams);
                for (String value : listOfAllParams) {
                    builder.add(key,
                            new HttpEntity<>(value, newHttpHeaders(request, key)));
                }
            }

This is the extractFromMultipartRequest method in the RequestContentDataExtractor class, listOfOnlyQueryParams does not have a URLDecoder

OlgaMaciaszek commented 3 months ago

Hello @jackding79 there does not seem to be extractFromMultipartRequest method or RequestContentDataExtractor class in the source code of Spring Cloud Netflix project for any versions currently under OSS maintenance. If you think this isn't accurate, please past a permalink to the method in the GitHub repository.

spring-cloud-issues commented 2 months ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues commented 2 months ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.