Author: hmt
Date: Tue May 15 13:30:30 2012
New Revision: 1338698

URL: http://svn.apache.org/viewvc?rev=1338698&view=rev
Log:
Enable POST with multipart form-data type through proxify

Modified:
    incubator/wookie/trunk/src/org/apache/wookie/proxy/ProxyClient.java

Modified: incubator/wookie/trunk/src/org/apache/wookie/proxy/ProxyClient.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/proxy/ProxyClient.java?rev=1338698&r1=1338697&r2=1338698&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/proxy/ProxyClient.java 
(original)
+++ incubator/wookie/trunk/src/org/apache/wookie/proxy/ProxyClient.java Tue May 
15 13:30:30 2012
@@ -102,7 +102,8 @@ public class ProxyClient {
                if (method == null) {
                        return null;
                } else if (method instanceof EntityEnclosingMethod) {
-                       if (this.parameters.length > 0 && method instanceof 
PostMethod) {
+                       if (this.parameters.length > 0 && method instanceof 
PostMethod && 
+                                       
request.getContentType().toLowerCase().contains("application/x-www-form-urlencoded"))
 {
                                ((PostMethod) 
method).addParameters(this.parameters);
                        } else {
                                ((EntityEnclosingMethod) 
method).setRequestEntity(new 
InputStreamRequestEntity(request.getInputStream()));


Reply via email to