cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r506386 - in /cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon: generation/GenericProxyGenerator.java util/RequestForwardingHttpMethod.java
Date Mon, 12 Feb 2007 09:24:29 GMT
Author: cziegeler
Date: Mon Feb 12 01:24:28 2007
New Revision: 506386

URL: http://svn.apache.org/viewvc?view=rev&rev=506386
Log:
Avoid deprecated methods

Modified:
    cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/generation/GenericProxyGenerator.java
    cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/util/RequestForwardingHttpMethod.java

Modified: cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/generation/GenericProxyGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/generation/GenericProxyGenerator.java?view=diff&rev=506386&r1=506385&r2=506386
==============================================================================
--- cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/generation/GenericProxyGenerator.java
(original)
+++ cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/generation/GenericProxyGenerator.java
Mon Feb 12 01:24:28 2007
@@ -36,6 +36,7 @@
 import org.apache.commons.httpclient.HttpState;
 import org.apache.commons.httpclient.HttpURL;
 import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
 import org.apache.excalibur.xml.sax.SAXParser;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -130,7 +131,8 @@
             // Build the forwarded connection
             HttpConnection conn = new HttpConnection(destination.getHost(), destination.getPort());
             HttpState state = new HttpState();
-            state.setCredentials(null, destination.getHost(),
+            AuthScope as = new AuthScope(destination.getHost(), destination.getPort());
+            state.setCredentials(as,
                 new UsernamePasswordCredentials(destination.getUser(), destination.getPassword()));
             method.setPath(path);
 

Modified: cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/util/RequestForwardingHttpMethod.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/util/RequestForwardingHttpMethod.java?view=diff&rev=506386&r1=506385&r2=506386
==============================================================================
--- cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/util/RequestForwardingHttpMethod.java
(original)
+++ cocoon/trunk/blocks/cocoon-proxy/cocoon-proxy-impl/src/main/java/org/apache/cocoon/util/RequestForwardingHttpMethod.java
Mon Feb 12 01:24:28 2007
@@ -27,6 +27,7 @@
 import org.apache.commons.httpclient.HttpURL;
 import org.apache.commons.httpclient.cookie.CookieSpecBase;
 import org.apache.commons.httpclient.methods.EntityEnclosingMethod;
+import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
 
 /**
  * This is a generic and externally configurable method, to forward any Request
@@ -50,7 +51,7 @@
             this.setPath(req.getRequestURI());
             cloneHeaders();
             cloneCookies();
-            setRequestBody(originalRequest.getInputStream());
+            setRequestEntity(new InputStreamRequestEntity(originalRequest.getInputStream()));
     }
     
 



Mime
View raw message