Author: hmt
Date: Tue May 15 13:54:59 2012
New Revision: 1338710
URL: http://svn.apache.org/viewvc?rev=1338710&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=1338710&r1=1338709&r2=1338710&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:54:59 2012
@@ -102,8 +102,8 @@ public class ProxyClient {
if (method == null) {
return null;
} else if (method instanceof EntityEnclosingMethod) {
- if (this.parameters.length > 0 && method instanceof
PostMethod &&
-
request.getContentType().toLowerCase().contains("application/x-www-form-urlencoded"))
{
+ if (this.parameters.length > 0 && method instanceof
PostMethod &&
+
!request.getContentType().toLowerCase().contains("multipart/form-data")) {
((PostMethod)
method).addParameters(this.parameters);
} else {
((EntityEnclosingMethod)
method).setRequestEntity(new
InputStreamRequestEntity(request.getInputStream()));