summaryrefslogtreecommitdiffstats
path: root/jdisc_http_service
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-02-08 16:15:05 +0100
committerBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-02-08 16:15:05 +0100
commit309975cab6d1157d483052581a8795cc331660cd (patch)
treef716ea381d777cdc9674a6addfacfa6cf7f3cc6e /jdisc_http_service
parent27ddf647d881ab58ae69dd629599b52ee7c9d320 (diff)
Allow 200 response without content
There is a window between the response is committed (headers including response code is set) and the response body is written, where the exception from the request handler can be catched. If that happens, the output stream will be closed before response body is written.
Diffstat (limited to 'jdisc_http_service')
-rw-r--r--jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java
index b973a7e34bc..36464eba492 100644
--- a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java
+++ b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java
@@ -312,8 +312,9 @@ public class HttpServerConformanceTest extends ServerProviderConformanceTest {
@Override
@Test
public void testRequestContentWriteNondeterministicExceptionWithAsyncCompletion() throws Throwable {
- new TestRunner().expect(anyOf(success(), serverError()))
- .execute();
+ new TestRunner()
+ .expect(anyOf(success(), successNoContent(), serverError()))
+ .execute();
}
@Override