hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r630177 - in /httpcomponents/httpcore/branches/limewire_contrib/module-nio/src: examples/org/apache/http/examples/nio/ main/java/org/apache/http/nio/protocol/ test/java/org/apache/http/nio/protocol/
Date Fri, 22 Feb 2008 12:38:15 GMT
Author: olegk
Date: Fri Feb 22 04:38:12 2008
New Revision: 630177

URL: http://svn.apache.org/viewvc?rev=630177&view=rev
Log:
HTTPCORE-148: Added ability to submit an HTTP response asynchronously using NHttpResponseTrigger
interface

Added:
    httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java
  (with props)
    httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
  (with props)
Modified:
    httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
    httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
    httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpRequestHandler.java
    httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java

Modified: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java?rev=630177&r1=630176&r2=630177&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
(original)
+++ httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
Fri Feb 22 04:38:12 2008
@@ -61,6 +61,7 @@
 import org.apache.http.nio.protocol.EventListener;
 import org.apache.http.nio.protocol.NHttpRequestHandler;
 import org.apache.http.nio.protocol.NHttpRequestHandlerResolver;
+import org.apache.http.nio.protocol.SimpleNHttpRequestHandler;
 import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.ListeningIOReactor;
 import org.apache.http.params.BasicHttpParams;
@@ -138,7 +139,7 @@
         System.out.println("Shutdown");
     }
 
-    static class HttpFileHandler implements NHttpRequestHandler {
+    static class HttpFileHandler extends SimpleNHttpRequestHandler {
 
         private final String docRoot;
         private final boolean useFileChannels;
@@ -149,8 +150,8 @@
         }
 
         public ConsumingNHttpEntity entityRequest(
-                HttpEntityEnclosingRequest request, HttpContext context)
-                throws HttpException, IOException {
+                final HttpEntityEnclosingRequest request,
+                final HttpContext context) throws HttpException, IOException {
             return new ConsumingNHttpEntityTemplate(
                     request.getEntity(),
                     new FileWriteListener(useFileChannels));

Modified: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java?rev=630177&r1=630176&r2=630177&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
(original)
+++ httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
Fri Feb 22 04:38:12 2008
@@ -48,6 +48,7 @@
 import org.apache.http.UnsupportedHttpVersionException;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
+import org.apache.http.nio.IOControl;
 import org.apache.http.nio.NHttpServerConnection;
 import org.apache.http.nio.NHttpServiceHandler;
 import org.apache.http.nio.entity.ConsumingNHttpEntity;
@@ -83,8 +84,8 @@
  * If incoming requests are entity requests, NHttpRequestHandlers are expected
  * to return a ConsumingNHttpEntity for reading the content. After the entity is
  * finished reading the data,
- * {@link NHttpRequestHandler#handle(HttpRequest, HttpResponse, NHttpResponseTrigger, HttpContext)}
is
- * called to generate a response.
+ * {@link NHttpRequestHandler#handle(HttpRequest, HttpResponse, NHttpResponseTrigger, HttpContext)}
+ * is called to generate a response.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * @author <a href="mailto:sberlin at gmail.com">Sam Berlin</a>
@@ -137,6 +138,8 @@
         HttpRequest request = conn.getHttpRequest();
         request.setParams(new DefaultedHttpParams(request.getParams(), this.params));
 
+        connState.setRequest(request);
+
         NHttpRequestHandler requestHandler = getRequestHandler(request);
         connState.setRequestHandler(requestHandler);
 
@@ -264,10 +267,9 @@
 
     public void inputReady(final NHttpServerConnection conn, final ContentDecoder decoder)
{
         HttpContext context = conn.getContext();
-        HttpRequest request = conn.getHttpRequest();
-
         ServerConnState connState = (ServerConnState) context.getAttribute(CONN_STATE);
 
+        HttpRequest request = connState.getRequest();
         ConsumingNHttpEntity consumingEntity = connState.getConsumingEntity();
 
         try {
@@ -292,13 +294,58 @@
     }
 
     public void responseReady(final NHttpServerConnection conn) {
+        HttpContext context = conn.getContext();
+        ServerConnState connState = (ServerConnState) context.getAttribute(CONN_STATE);
+
+        if (connState.isHandled()) {
+            return;
+        }
+
+        HttpRequest request = connState.getRequest();
+        HttpResponse response = null;
+
+        try {
+
+            IOException ioex = connState.getIOExepction();
+            if (ioex != null) {
+                throw ioex;
+            }
+
+            HttpException httpex = connState.getHttpExepction();
+            if (httpex != null) {
+                response = this.responseFactory.newHttpResponse(HttpVersion.HTTP_1_0,
+                        HttpStatus.SC_INTERNAL_SERVER_ERROR, context);
+                response.setParams(
+                        new DefaultedHttpParams(response.getParams(), this.params));
+                handleException(httpex, response);
+                connState.setResponse(response);
+            }
+
+            response = connState.getResponse();
+            if (response != null) {
+                connState.setHandled(true);
+                sendResponse(conn, request, response);
+            }
+
+        } catch (IOException ex) {
+            shutdownConnection(conn, ex);
+            if (this.eventListener != null) {
+                this.eventListener.fatalIOException(ex, conn);
+            }
+        } catch (HttpException ex) {
+            closeConnection(conn, ex);
+            if (this.eventListener != null) {
+                this.eventListener.fatalProtocolException(ex, conn);
+            }
+        }
     }
 
     public void outputReady(final NHttpServerConnection conn, final ContentEncoder encoder)
{
         HttpContext context = conn.getContext();
-        HttpResponse response = conn.getHttpResponse();
         ServerConnState connState = (ServerConnState) context.getAttribute(CONN_STATE);
 
+        HttpResponse response = conn.getHttpResponse();
+
         try {
             ProducingNHttpEntity entity = (ProducingNHttpEntity) response.getEntity();
             entity.produceContent(encoder, conn);
@@ -344,6 +391,8 @@
             final HttpRequest request) throws IOException, HttpException {
 
         HttpContext context = conn.getContext();
+        ServerConnState connState = (ServerConnState) context.getAttribute(CONN_STATE);
+
         ProtocolVersion ver = request.getRequestLine().getProtocolVersion();
 
         if (!ver.lessEquals(HttpVersion.HTTP_1_1)) {
@@ -351,24 +400,29 @@
             ver = HttpVersion.HTTP_1_1;
         }
 
-        HttpResponse response = this.responseFactory.newHttpResponse(
-                ver,
-                HttpStatus.SC_OK,
-                conn.getContext());
-        response.setParams(
-                new DefaultedHttpParams(response.getParams(), this.params));
-
+        HttpResponse response = null;
         try {
 
             this.httpProcessor.process(request, context);
 
-            NHttpRequestHandler handler = getRequestHandler(request);
+            NHttpRequestHandler handler = connState.getRequestHandler();
             if (handler != null) {
-                handler.handle(request, response, context);
+                response = this.responseFactory.newHttpResponse(
+                        ver, HttpStatus.SC_OK, context);
+                response.setParams(
+                        new DefaultedHttpParams(response.getParams(), this.params));
+
+                handler.handle(
+                        request,
+                        response,
+                        new ResponseTriggerImpl(connState, conn),
+                        context);
             } else {
-                response.setStatusCode(HttpStatus.SC_NOT_IMPLEMENTED);
+                response = this.responseFactory.newHttpResponse(ver,
+                        HttpStatus.SC_NOT_IMPLEMENTED, context);
+                response.setParams(
+                        new DefaultedHttpParams(response.getParams(), this.params));
             }
-            sendResponse(conn, request, response);
 
         } catch (HttpException ex) {
             response = this.responseFactory.newHttpResponse(HttpVersion.HTTP_1_0,
@@ -377,11 +431,17 @@
                     new DefaultedHttpParams(response.getParams(), this.params));
             handleException(ex, response);
         }
+        if (response != null) {
+            connState.setResponse(response);
+            sendResponse(conn, request, response);
+            connState.setHandled(true);
+        }
     }
 
-    private void sendResponse(final NHttpServerConnection conn,
-            HttpRequest request, HttpResponse response) throws IOException,
-            HttpException {
+    private void sendResponse(
+            final NHttpServerConnection conn,
+            final HttpRequest request,
+            final HttpResponse response) throws IOException, HttpException {
         HttpContext context = conn.getContext();
         ServerConnState connState = (ServerConnState) context.getAttribute(CONN_STATE);
 
@@ -426,9 +486,14 @@
 
     protected static class ServerConnState {
 
-        private NHttpRequestHandler requestHandler;
-        private ConsumingNHttpEntity consumingEntity;
-        private ProducingNHttpEntity producingEntity;
+        private volatile NHttpRequestHandler requestHandler;
+        private volatile HttpRequest request;
+        private volatile ConsumingNHttpEntity consumingEntity;
+        private volatile HttpResponse response;
+        private volatile ProducingNHttpEntity producingEntity;
+        private volatile IOException ioex;
+        private volatile HttpException httpex;
+        private volatile boolean handled;
 
         public void finishInput() {
             if (this.consumingEntity != null) {
@@ -446,7 +511,11 @@
 
         public void reset() {
             finishInput();
+            this.request = null;
             finishOutput();
+            this.response = null;
+            this.ioex = null;
+            this.httpex = null;
             this.requestHandler = null;
         }
 
@@ -458,12 +527,12 @@
             this.requestHandler = requestHandler;
         }
 
-        public ProducingNHttpEntity getProducingEntity() {
-            return this.producingEntity;
+        public HttpRequest getRequest() {
+            return this.request;
         }
 
-        public void setProducingEntity(final ProducingNHttpEntity producingEntity) {
-            this.producingEntity = producingEntity;
+        public void setRequest(final HttpRequest request) {
+            this.request = request;
         }
 
         public ConsumingNHttpEntity getConsumingEntity() {
@@ -472,6 +541,91 @@
 
         public void setConsumingEntity(final ConsumingNHttpEntity consumingEntity) {
             this.consumingEntity = consumingEntity;
+        }
+
+        public HttpResponse getResponse() {
+            return this.response;
+        }
+
+        public void setResponse(final HttpResponse response) {
+            this.response = response;
+        }
+
+        public ProducingNHttpEntity getProducingEntity() {
+            return this.producingEntity;
+        }
+
+        public void setProducingEntity(final ProducingNHttpEntity producingEntity) {
+            this.producingEntity = producingEntity;
+        }
+
+        public IOException getIOExepction() {
+            return this.ioex;
+        }
+
+        public void setIOExepction(final IOException ex) {
+            this.ioex = ex;
+        }
+
+        public HttpException getHttpExepction() {
+            return this.httpex;
+        }
+
+        public void setHttpExepction(final HttpException ex) {
+            this.httpex = ex;
+        }
+
+        public boolean isHandled() {
+            return this.handled;
+        }
+
+        public void setHandled(boolean handled) {
+            this.handled = handled;
+        }
+
+    }
+
+    private static class ResponseTriggerImpl implements NHttpResponseTrigger {
+
+        private final ServerConnState connState;
+        private final IOControl iocontrol;
+
+        private volatile boolean triggered;
+
+        public ResponseTriggerImpl(final ServerConnState connState, final IOControl iocontrol)
{
+            super();
+            this.connState = connState;
+            this.iocontrol = iocontrol;
+        }
+
+        public void submitResponse(final HttpResponse response) {
+            if (response == null) {
+                throw new IllegalArgumentException("Response may not be null");
+            }
+            if (this.triggered) {
+                throw new IllegalStateException("Response already triggered");
+            }
+            this.triggered = true;
+            this.connState.setResponse(response);
+            this.iocontrol.requestOutput();
+        }
+
+        public void handleException(final HttpException ex) {
+            if (this.triggered) {
+                throw new IllegalStateException("Response already triggered");
+            }
+            this.triggered = true;
+            this.connState.setHttpExepction(ex);
+            this.iocontrol.requestOutput();
+        }
+
+        public void handleException(final IOException ex) {
+            if (this.triggered) {
+                throw new IllegalStateException("Response already triggered");
+            }
+            this.triggered = true;
+            this.connState.setIOExepction(ex);
+            this.iocontrol.requestOutput();
         }
 
     }

Modified: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpRequestHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpRequestHandler.java?rev=630177&r1=630176&r2=630177&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpRequestHandler.java
(original)
+++ httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpRequestHandler.java
Fri Feb 22 04:38:12 2008
@@ -42,10 +42,12 @@
 
 public interface NHttpRequestHandler {
 
-    ConsumingNHttpEntity entityRequest(HttpEntityEnclosingRequest request, HttpContext context)
+    ConsumingNHttpEntity entityRequest(HttpEntityEnclosingRequest request,
+            HttpContext context)
         throws HttpException, IOException;
 
-    void handle(HttpRequest request, HttpResponse response, HttpContext context)
-            throws HttpException, IOException;
+    void handle(HttpRequest request, HttpResponse response,
+            NHttpResponseTrigger trigger, HttpContext context)
+        throws HttpException, IOException;
 
 }

Added: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java?rev=630177&view=auto
==============================================================================
--- httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java
(added)
+++ httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java
Fri Feb 22 04:38:12 2008
@@ -0,0 +1,58 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.nio.protocol;
+
+import java.io.IOException;
+
+import org.apache.http.HttpException;
+import org.apache.http.HttpResponse;
+
+public interface NHttpResponseTrigger {
+
+    /**
+     * Submits a response for sending.
+     */
+    void submitResponse(HttpResponse response);
+
+    /**
+     * Submits a protocol exception that was generated while
+     * processing a request.
+     */
+    void handleException(HttpException ex);
+
+    /**
+     * Submits an IOException that was generated while
+     * processing a request.
+     */
+    void handleException(IOException ex);
+
+}

Propchange: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java?rev=630177&view=auto
==============================================================================
--- httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
(added)
+++ httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
Fri Feb 22 04:38:12 2008
@@ -0,0 +1,29 @@
+package org.apache.http.nio.protocol;
+
+import java.io.IOException;
+
+import org.apache.http.HttpException;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponse;
+import org.apache.http.protocol.HttpContext;
+
+/**
+ * A simple implementation of {@link NHttpRequestHandler} that abstracts away
+ * the need to use {@link NHttpResponseTrigger}. Implementations need only to
+ * implement {@link #handle(HttpRequest, HttpResponse, HttpContext)}.
+ */
+public abstract class SimpleNHttpRequestHandler implements NHttpRequestHandler {
+
+    public final void handle(
+            final HttpRequest request,
+            final HttpResponse response,
+            final NHttpResponseTrigger trigger,
+            final HttpContext context) throws HttpException, IOException {
+        handle(request, response, context);
+        trigger.submitResponse(response);
+    }
+
+    public abstract void handle(HttpRequest request, HttpResponse response, HttpContext context)
+        throws HttpException, IOException;
+
+}
\ No newline at end of file

Propchange: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java?rev=630177&r1=630176&r2=630177&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java
(original)
+++ httpcomponents/httpcore/branches/limewire_contrib/module-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java
Fri Feb 22 04:38:12 2008
@@ -237,7 +237,7 @@
             responseData.add(new ByteSequence());
         }
 
-        NHttpRequestHandler requestHandler = new NHttpRequestHandler() {
+        NHttpRequestHandler requestHandler = new SimpleNHttpRequestHandler() {
 
             public ConsumingNHttpEntity entityRequest(
                     HttpEntityEnclosingRequest request, HttpContext context) {
@@ -370,7 +370,7 @@
             responseData.add(new ByteSequence());
         }
 
-        NHttpRequestHandler requestHandler = new NHttpRequestHandler() {
+        NHttpRequestHandler requestHandler = new SimpleNHttpRequestHandler() {
 
             public ConsumingNHttpEntity entityRequest(
                     HttpEntityEnclosingRequest request, HttpContext context)
@@ -507,7 +507,7 @@
             responseData.add(new ByteSequence());
         }
 
-        NHttpRequestHandler requestHandler = new NHttpRequestHandler() {
+        NHttpRequestHandler requestHandler = new SimpleNHttpRequestHandler() {
 
             public ConsumingNHttpEntity entityRequest(
                     HttpEntityEnclosingRequest request, HttpContext context)
@@ -649,7 +649,7 @@
             responseData.add(new ByteSequence());
         }
 
-        NHttpRequestHandler requestHandler = new NHttpRequestHandler() {
+        NHttpRequestHandler requestHandler = new SimpleNHttpRequestHandler() {
 
             public ConsumingNHttpEntity entityRequest(
                     HttpEntityEnclosingRequest request, HttpContext context)
@@ -791,7 +791,7 @@
             responseData.add(new ByteSequence());
         }
 
-        NHttpRequestHandler requestHandler = new NHttpRequestHandler() {
+        NHttpRequestHandler requestHandler = new SimpleNHttpRequestHandler() {
 
             public ConsumingNHttpEntity entityRequest(
                     HttpEntityEnclosingRequest request, HttpContext context)
@@ -926,7 +926,7 @@
         final RequestCount requestCount = new RequestCount(reqNo);
         final ResponseSequence responses = new ResponseSequence();
 
-        NHttpRequestHandler requestHandler = new NHttpRequestHandler() {
+        NHttpRequestHandler requestHandler = new SimpleNHttpRequestHandler() {
 
             public ConsumingNHttpEntity entityRequest(
                     HttpEntityEnclosingRequest request, HttpContext context)
@@ -1084,7 +1084,7 @@
 
         final String[] method = new String[1];
 
-        NHttpRequestHandler requestHandler = new NHttpRequestHandler() {
+        NHttpRequestHandler requestHandler = new SimpleNHttpRequestHandler() {
 
             public ConsumingNHttpEntity entityRequest(
                     HttpEntityEnclosingRequest request, HttpContext context)



Mime
View raw message