Unverified Commit 7e493ea3 by Michael Hartle Committed by Spencer Gibb

Fixed an issue where the pre FormBodyWrapperFilter adds multiples of every…

Fixed an issue where the pre FormBodyWrapperFilter adds multiples of every multipart part to a request
parent fcdc5a78
...@@ -184,10 +184,10 @@ public class FormBodyWrapperFilter extends ZuulFilter { ...@@ -184,10 +184,10 @@ public class FormBodyWrapperFilter extends ZuulFilter {
MultipartRequest multi = (MultipartRequest) this.request; MultipartRequest multi = (MultipartRequest) this.request;
for (Entry<String, List<MultipartFile>> parts : multi for (Entry<String, List<MultipartFile>> parts : multi
.getMultiFileMap().entrySet()) { .getMultiFileMap().entrySet()) {
for (Part file : this.request.getParts()) { for (MultipartFile file : parts.getValue()) {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.setContentDispositionFormData(file.getName(), headers.setContentDispositionFormData(file.getName(),
file.getSubmittedFileName()); file.getOriginalFilename());
if (file.getContentType() != null) { if (file.getContentType() != null) {
headers.setContentType( headers.setContentType(
MediaType.valueOf(file.getContentType())); MediaType.valueOf(file.getContentType()));
......
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