This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 7457846990213ef722f6a2447294714df101e1cb
Author: Tran Tien Duc <dt...@linagora.com>
AuthorDate: Thu May 2 17:24:50 2019 +0700

    JAMES-2744 James download currently doesn't provide Content-Type header
---
 .../jmap/methods/integration/cucumber/DownloadStepdefs.java   | 11 +++++++++++
 .../src/test/resources/cucumber/DownloadGet.feature           |  6 ++++++
 2 files changed, 17 insertions(+)

diff --git 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
index fefe803..b1450a0 100644
--- 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
+++ 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
@@ -456,6 +456,17 @@ public class DownloadStepdefs {
         
assertThat(response.getFirstHeader("Content-Length").getValue()).isEqualTo(String.valueOf(size));
     }
 
+    @Then("^there is no Content-Type$")
+    public void assertNoContentType() {
+        assertThat(response.getFirstHeader("Content-Type"))
+            .isNull();
+    }
+
+    @Then("^the Content-Type is \"([^\"]*)\"$")
+    public void assertContentType(String contentType) {
+        
assertThat(response.getFirstHeader("Content-Type").getValue()).isEqualTo(contentType);
+    }
+
     private void assertEncodedFilenameMatches(String name) {
         String contentDispositionHeader = 
response.getHeaders("Content-Disposition")[0].toString();
         
assertThat(contentDispositionHeader).startsWith(UTF8_CONTENT_DIPOSITION_START);
diff --git 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature
 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature
index 2c225c7..4b7c889 100644
--- 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature
+++ 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature
@@ -50,6 +50,12 @@ Feature: Download GET
     Then she can read that blob
     And the attachment is named "ديناصور.odt"
 
+  Scenario: Getting an attachment with a specified Content-Type
+    Given "al...@domain.tld" mailbox "INBOX" contains a message "1" with an 
attachment "2"
+    When "al...@domain.tld" downloads "2" with "myFileName.txt" name
+    Then she can read that blob
+    And there is no Content-Type
+
   @BasicFeature
   Scenario: Getting a message blob previously stored
     Given "al...@domain.tld" mailbox "INBOX" contains a message "1"


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to