hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r450189 - /jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/AsyncHttpServer.java
Date Tue, 26 Sep 2006 20:38:06 GMT
Author: olegk
Date: Tue Sep 26 13:38:05 2006
New Revision: 450189

URL: http://svn.apache.org/viewvc?view=rev&rev=450189
Log:
Fixed breakage in the AsyncHttpServer sample caused by the latest API changes

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/AsyncHttpServer.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/AsyncHttpServer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/AsyncHttpServer.java?view=diff&rev=450189&r1=450188&r2=450189
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/AsyncHttpServer.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/AsyncHttpServer.java
Tue Sep 26 13:38:05 2006
@@ -31,6 +31,7 @@
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.protocol.BasicHttpProcessor;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpExecutionContext;
 import org.apache.http.protocol.HttpRequestHandler;
@@ -97,11 +98,13 @@
             session.setAttribute(PRODUCER, conn.getIOProducer());
             
             // Set up HTTP service
-            HttpService httpService = new HttpService();
-            httpService.addInterceptor(new ResponseDate());
-            httpService.addInterceptor(new ResponseServer());                    
-            httpService.addInterceptor(new ResponseContent());
-            httpService.addInterceptor(new ResponseConnControl());
+            BasicHttpProcessor httpProcessor = new BasicHttpProcessor();
+            httpProcessor.addInterceptor(new ResponseDate());
+            httpProcessor.addInterceptor(new ResponseServer());                    
+            httpProcessor.addInterceptor(new ResponseContent());
+            httpProcessor.addInterceptor(new ResponseConnControl());
+
+            HttpService httpService = new HttpService(httpProcessor);
             httpService.setParams(this.params);
             httpService.registerRequestHandler("*", new HttpFileHandler());
             



Mime
View raw message