Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions feign-form/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@

<name>Open Feign Forms Core</name>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion feign-form/src/test/java/feign/form/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE;

import java.io.IOException;
import org.apache.commons.text.StringEscapeUtils;
import java.util.Collection;
import java.util.List;
import lombok.val;
Expand Down Expand Up @@ -160,7 +161,7 @@ public ResponseEntity<String> uploadByteArrayParameter(MultipartHttpServletReque
@PostMapping(path = "/upload/unknown_type", consumes = MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<String> uploadUnknownType(@RequestPart("file") MultipartFile file) {
val status = file != null ? OK : I_AM_A_TEAPOT;
return ResponseEntity.status(status).body(file.getContentType());
return ResponseEntity.status(status).body(StringEscapeUtils.escapeHtml4(file.getContentType()));
}

@PostMapping(path = "/upload/form_data", consumes = MULTIPART_FORM_DATA_VALUE)
Expand Down
Loading