From dc2a817cd1915c4a2aa670fd4375339e2aadf59b Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 8 Sep 2009 20:04:18 +0000 Subject: [PATCH] Added capability of sending a request without waiting for the response, to test async requests. git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@832 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../java/org/eclipse/jetty/server/LocalConnector.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java index 0d38dcc413f..9a577cfd9dd 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java @@ -78,6 +78,12 @@ public class LocalConnector extends AbstractConnector return -1; } + public void executeRequest(String rawRequest) throws IOException + { + Request request = new Request(new ByteArrayBuffer(rawRequest, "UTF-8"), true, null); + requests.add(request); + } + private class Request implements Runnable { private final ByteArrayBuffer requestsBuffer; @@ -115,7 +121,8 @@ public class LocalConnector extends AbstractConnector if (!leaveOpen) connectionClosed(connection); responsesBuffer = endPoint.getOut(); - latch.countDown(); + if (latch != null) + latch.countDown(); } }