diff --git a/spring-web/src/main/java/org/springframework/http/ContentDisposition.java b/spring-web/src/main/java/org/springframework/http/ContentDisposition.java
index a9e574148c5..4d480116c39 100644
--- a/spring-web/src/main/java/org/springframework/http/ContentDisposition.java
+++ b/spring-web/src/main/java/org/springframework/http/ContentDisposition.java
@@ -33,18 +33,20 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import static java.time.format.DateTimeFormatter.RFC_1123_DATE_TIME;
/**
- * Represent the Content-Disposition type and parameters as defined in RFC 2183.
+ * Represent the Content-Disposition type and parameters as defined in RFC 6266.
*
* @author Sebastien Deleuze
* @author Juergen Hoeller
+ * @author Rossen Stoyanchev
* @since 5.0
- * @see RFC 2183
+ * @see RFC 6266
*/
public final class ContentDisposition {
private static final String INVALID_HEADER_FIELD_PARAMETER_FORMAT =
"Invalid header field parameter format (as defined in RFC 5987)";
+
@Nullable
private final String type;
@@ -124,7 +126,11 @@ public final class ContentDisposition {
/**
* Return the value of the {@literal size} parameter, or {@code null} if not defined.
+ * @deprecated since 5.2.3 as per
+ * RFC 6266, Apendix B,
+ * to be removed in a future release.
*/
+ @Deprecated
@Nullable
public Long getSize() {
return this.size;
@@ -132,7 +138,11 @@ public final class ContentDisposition {
/**
* Return the value of the {@literal creation-date} parameter, or {@code null} if not defined.
+ * @deprecated since 5.2.3 as per
+ * RFC 6266, Apendix B,
+ * to be removed in a future release.
*/
+ @Deprecated
@Nullable
public ZonedDateTime getCreationDate() {
return this.creationDate;
@@ -140,7 +150,11 @@ public final class ContentDisposition {
/**
* Return the value of the {@literal modification-date} parameter, or {@code null} if not defined.
+ * @deprecated since 5.2.3 as per
+ * RFC 6266, Apendix B,
+ * to be removed in a future release.
*/
+ @Deprecated
@Nullable
public ZonedDateTime getModificationDate() {
return this.modificationDate;
@@ -148,7 +162,11 @@ public final class ContentDisposition {
/**
* Return the value of the {@literal read-date} parameter, or {@code null} if not defined.
+ * @deprecated since 5.2.3 as per
+ * RFC 6266, Apendix B,
+ * to be removed in a future release.
*/
+ @Deprecated
@Nullable
public ZonedDateTime getReadDate() {
return this.readDate;
@@ -188,7 +206,7 @@ public final class ContentDisposition {
}
/**
- * Return the header value for this content disposition as defined in RFC 2183.
+ * Return the header value for this content disposition as defined in RFC 6266.
* @see #parse(String)
*/
@Override
@@ -480,22 +498,38 @@ public final class ContentDisposition {
/**
* Set the value of the {@literal size} parameter.
+ * @deprecated since 5.2.3 as per
+ * RFC 6266, Apendix B,
+ * to be removed in a future release.
*/
+ @Deprecated
Builder size(Long size);
/**
* Set the value of the {@literal creation-date} parameter.
+ * @deprecated since 5.2.3 as per
+ * RFC 6266, Apendix B,
+ * to be removed in a future release.
*/
+ @Deprecated
Builder creationDate(ZonedDateTime creationDate);
/**
* Set the value of the {@literal modification-date} parameter.
+ * @deprecated since 5.2.3 as per
+ * RFC 6266, Apendix B,
+ * to be removed in a future release.
*/
+ @Deprecated
Builder modificationDate(ZonedDateTime modificationDate);
/**
* Set the value of the {@literal read-date} parameter.
+ * @deprecated since 5.2.3 as per
+ * RFC 6266, Apendix B,
+ * to be removed in a future release.
*/
+ @Deprecated
Builder readDate(ZonedDateTime readDate);
/**