You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/08/26 11:38:25 UTC

[james-project] 02/11: JAMES-2178 Decrease size of request for upload authentication

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 c4543b58bb085562fb8f37add4917cb50c902dd6
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Aug 26 15:06:11 2019 +0700

    JAMES-2178 Decrease size of request for upload authentication
    
    Otherwize James throws a 401 and closes the connection before the client finished streaming the content, resulting in a Connection reset error
---
 .../apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java
index e1a1ab1..32454cc 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java
@@ -55,6 +55,7 @@ import cucumber.runtime.java.guice.ScenarioScoped;
 
 @ScenarioScoped
 public class UploadStepdefs {
+    private static final int _24K = 24 * 1024;
     private static final int _1M = 1024 * 1024;
     private static final int _10M = 10 * _1M;
 
@@ -118,7 +119,7 @@ public class UploadStepdefs {
     @When("^someone upload a content without authentification$")
     public void userUploadContentWithoutAuthentification() throws Throwable {
         Request request = Request.Post(uploadUri)
-            .bodyStream(new BufferedInputStream(new ZeroedInputStream(_1M), _1M), org.apache.http.entity.ContentType.DEFAULT_BINARY);
+            .bodyStream(new BufferedInputStream(new ZeroedInputStream(_24K), _24K), org.apache.http.entity.ContentType.DEFAULT_BINARY);
         response = Executor.newInstance(newClient())
             .execute(request)
             .returnResponse();


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