File tree Expand file tree Collapse file tree
main/java/org/apache/hc/core5/http
test/java/org/apache/hc/core5/http Expand file tree Collapse file tree 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+
114Release 5.3
215------------------
316
Original file line number Diff line number Diff line change @@ -75,6 +75,17 @@ public final class ContentType implements Serializable {
7575 public static final ContentType APPLICATION_JSON = create (
7676 "application/json" , StandardCharsets .UTF_8 );
7777
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+
7889 /**
7990 * Public constant media type for {@code application/x-ndjson}.
8091 * @since 5.1
Original file line number Diff line number Diff line change 4040 */
4141class TestContentType {
4242
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+
4351 @ Test
4452 void testBasis () throws Exception {
4553 final ContentType contentType = ContentType .create ("text/plain" , "US-ASCII" );
You can’t perform that action at this time.
0 commit comments