Merge branch '5.2.x'

# Conflicts:
#	build.gradle
#	src/docs/asciidoc/core/core-aop-api.adoc
This commit is contained in:
Juergen Hoeller
2020-09-14 22:22:02 +02:00
9 changed files with 69 additions and 50 deletions

View File

@@ -562,7 +562,7 @@ public final class ContentDisposition {
private static class BuilderImpl implements Builder {
private String type;
private final String type;
@Nullable
private String name;

View File

@@ -861,7 +861,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
public void setContentDispositionFormData(String name, @Nullable String filename) {
Assert.notNull(name, "Name must not be null");
ContentDisposition.Builder disposition = ContentDisposition.builder("form-data").name(name);
if (filename != null) {
if (StringUtils.hasText(filename)) {
disposition.filename(filename);
}
setContentDisposition(disposition.build());
@@ -888,7 +888,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
*/
public ContentDisposition getContentDisposition() {
String contentDisposition = getFirst(CONTENT_DISPOSITION);
if (contentDisposition != null) {
if (StringUtils.hasText(contentDisposition)) {
return ContentDisposition.parse(contentDisposition);
}
return ContentDisposition.empty();