hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
Subject svn commit: r541923 - in /jakarta/httpcomponents/httpcore/trunk/module-main/src: examples/org/apache/http/examples/ main/java/org/apache/http/protocol/ test/java/org/apache/http/mockup/
Date Sat, 26 May 2007 18:33:41 GMT
Author: rolandw
Date: Sat May 26 11:33:40 2007
New Revision: 541923

URL: http://svn.apache.org/viewvc?view=rev&rev=541923
Log:
params refactoring, step 3 - HttpRequestExecutor no longer links params

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java?view=diff&rev=541923&r1=541922&r2=541923
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java
Sat May 26 11:33:40 2007
@@ -109,7 +109,7 @@
                 System.out.println(">> Request URI: " + request.getRequestLine().getUri());
                 
                 context.setAttribute(HttpExecutionContext.HTTP_REQUEST, request);
-                
+                request.setParams(httpexecutor.getParams());
                 httpexecutor.preProcess(request, httpproc, context);
                 HttpResponse response = httpexecutor.execute(request, conn, context);
                 httpexecutor.postProcess(response, httpproc, context);

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java?view=diff&rev=541923&r1=541922&r2=541923
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java
Sat May 26 11:33:40 2007
@@ -123,7 +123,7 @@
                 System.out.println(">> Request URI: " + request.getRequestLine().getUri());
 
                 context.setAttribute(HttpExecutionContext.HTTP_REQUEST, request);
-                
+                request.setParams(httpexecutor.getParams());
                 httpexecutor.preProcess(request, httpproc, context);
                 HttpResponse response = httpexecutor.execute(request, conn, context);
                 httpexecutor.postProcess(response, httpproc, context);

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java?view=diff&rev=541923&r1=541922&r2=541923
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java
Sat May 26 11:33:40 2007
@@ -169,8 +169,6 @@
         if (context == null) {
             throw new IllegalArgumentException("HTTP context may not be null");
         }
-        // link default parameters
-        request.getParams().setDefaults(this.params);
         processor.process(request, context);
     }
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java?view=diff&rev=541923&r1=541922&r2=541923
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java
Sat May 26 11:33:40 2007
@@ -97,6 +97,7 @@
         this.context.setAttribute(HttpExecutionContext.HTTP_REQUEST, request);
         this.context.setAttribute(HttpExecutionContext.HTTP_TARGET_HOST, targetHost);
         this.context.setAttribute(HttpExecutionContext.HTTP_CONNECTION, conn);
+        request.getParams().setDefaults(httpexecutor.getParams());
         this.httpexecutor.preProcess(request, this.httpproc, this.context);
         HttpResponse response = this.httpexecutor.execute(request, conn, this.context);
         this.httpexecutor.postProcess(response, this.httpproc, this.context);



Mime
View raw message