File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
main/java/org/apache/hc/core5/http
test/java/org/apache/hc/core5/http Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ Release 5.4-alpha1
2
+ ------------------
3
+
4
+ This is the first release in the 5.4 release series.
5
+
6
+
7
+ Change Log
8
+ -------------------
9
+
10
+ * Add ContentType.APPLICATION_ZIP_COMPRESSED.
11
+ Contributed by Gary Gregory <ggregory at apache.org>
12
+
13
+
1
14
Release 5.3
2
15
------------------
3
16
Original file line number Diff line number Diff line change @@ -75,6 +75,17 @@ public final class ContentType implements Serializable {
75
75
public static final ContentType APPLICATION_JSON = create (
76
76
"application/json" , StandardCharsets .UTF_8 );
77
77
78
+ /**
79
+ * Public constant media type for ZIP archives {@code application/x-zip-compressed}.
80
+ * <p>
81
+ * Note that Windows uploads {@code .zip} files with this non-standard MIME type.
82
+ * </p>
83
+ *
84
+ * @see <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types">ZIP archive application/x-zip-compressed</a>
85
+ * @since 5.4
86
+ */
87
+ public static final ContentType APPLICATION_ZIP_COMPRESSED = create ("application/x-zip-compressed" );
88
+
78
89
/**
79
90
* Public constant media type for {@code application/x-ndjson}.
80
91
* @since 5.1
Original file line number Diff line number Diff line change 40
40
*/
41
41
class TestContentType {
42
42
43
+ @ Test
44
+ void testApplicationZipCompressed () {
45
+ final ContentType contentType = ContentType .create ("application/x-zip-compressed" );
46
+ Assertions .assertEquals (contentType .toString (), ContentType .APPLICATION_ZIP_COMPRESSED .toString ());
47
+ Assertions .assertTrue (contentType .isSameMimeType (ContentType .APPLICATION_ZIP_COMPRESSED ));
48
+ Assertions .assertTrue (ContentType .APPLICATION_ZIP_COMPRESSED .isSameMimeType (contentType ));
49
+ }
50
+
43
51
@ Test
44
52
void testBasis () throws Exception {
45
53
final ContentType contentType = ContentType .create ("text/plain" , "US-ASCII" );
You can’t perform that action at this time.
0 commit comments