You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2022/10/26 13:00:37 UTC
[httpcomponents-core] branch master updated (d31e3b6db -> a24609fa1)
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
from d31e3b6db Improved capacity tracking in async EchoHandler
new 793bbc2dc Corrected asserts in Http1IntegrationTest#testExpectationFailed test case
new a24609fa1 Bug fix: HTTP/1.1 must continue message processing as long as there is data in the session input buffer
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/hc/core5/testing/nio/Http1IntegrationTest.java | 11 +++++------
.../hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java | 3 ---
2 files changed, 5 insertions(+), 9 deletions(-)
[httpcomponents-core] 02/02: Bug fix: HTTP/1.1 must continue message processing as long as there is data in the session input buffer
Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit a24609fa1d0d458070cc70e2e06ddf6f93532af9
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Wed Oct 26 14:51:12 2022 +0200
Bug fix: HTTP/1.1 must continue message processing as long as there is data in the session input buffer
---
.../java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java | 3 +--
.../org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java | 3 ---
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
index 73eb29a19..46d5602a5 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
@@ -131,7 +131,6 @@ import org.apache.hc.core5.util.TextUtils;
import org.apache.hc.core5.util.Timeout;
import org.hamcrest.CoreMatchers;
import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
@@ -738,7 +737,7 @@ public abstract class Http1IntegrationTest {
}
}
- @Test @Disabled("Fails intermittently on GitLab. Under investigation")
+ @Test
public void testExpectationFailed() throws Exception {
final Http1TestServer server = resources.server();
final Http1TestClient client = resources.client();
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java
index 1438ee73d..944486ef0 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java
@@ -336,9 +336,6 @@ abstract class AbstractHttp1StreamDuplexer<IncomingMessage extends HttpMessage,
ioSession.setEvent(SelectionKey.OP_READ);
inputEnd();
}
- if (bytesRead == 0) {
- break;
- }
}
} while (inbuf.hasData());
[httpcomponents-core] 01/02: Corrected asserts in Http1IntegrationTest#testExpectationFailed test case
Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 793bbc2dc2d1baf05f3a337e1e4ca1df0b3a6686
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Wed Oct 26 14:49:28 2022 +0200
Corrected asserts in Http1IntegrationTest#testExpectationFailed test case
---
.../org/apache/hc/core5/testing/nio/Http1IntegrationTest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
index e3c471ac0..73eb29a19 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
@@ -783,7 +783,7 @@ public abstract class Http1IntegrationTest {
final HttpResponse response1 = result1.getHead();
Assertions.assertNotNull(response1);
Assertions.assertEquals(200, response1.getCode());
- Assertions.assertNotNull("All is well", result1.getBody());
+ Assertions.assertEquals("All is well", result1.getBody());
Assertions.assertTrue(ioSession.isOpen());
@@ -796,7 +796,7 @@ public abstract class Http1IntegrationTest {
final HttpResponse response2 = result2.getHead();
Assertions.assertNotNull(response2);
Assertions.assertEquals(HttpStatus.SC_UNAUTHORIZED, response2.getCode());
- Assertions.assertNotNull("You shall not pass", result2.getBody());
+ Assertions.assertEquals("You shall not pass", result2.getBody());
Assertions.assertTrue(ioSession.isOpen());
@@ -810,7 +810,7 @@ public abstract class Http1IntegrationTest {
final HttpResponse response3 = result3.getHead();
Assertions.assertNotNull(response3);
Assertions.assertEquals(200, response3.getCode());
- Assertions.assertNotNull("All is well", result3.getBody());
+ Assertions.assertEquals("All is well", result3.getBody());
Assertions.assertTrue(ioSession.isOpen());
@@ -823,7 +823,7 @@ public abstract class Http1IntegrationTest {
final HttpResponse response4 = result4.getHead();
Assertions.assertNotNull(response4);
Assertions.assertEquals(HttpStatus.SC_UNAUTHORIZED, response4.getCode());
- Assertions.assertNotNull("You shall not pass", result4.getBody());
+ Assertions.assertEquals("You shall not pass", result4.getBody());
Assertions.assertFalse(ioSession.isOpen());
}