jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1294596 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Date Tue, 28 Feb 2012 12:03:42 GMT
Author: pmouawad
Date: Tue Feb 28 12:03:41 2012
New Revision: 1294596

URL: http://svn.apache.org/viewvc?rev=1294596&view=rev
Log:
Bug 52781 - Content-Disposition header garbled even if browser compatible headers is checked
(HC4) 
Handle correctly null contentEncoding

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1294596&r1=1294595&r2=1294596&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Tue Feb 28 12:03:41 2012
@@ -88,7 +88,6 @@ import org.apache.http.params.HttpParams
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
-
 import org.apache.jmeter.protocol.http.control.AuthManager;
 import org.apache.jmeter.protocol.http.control.Authorization;
 import org.apache.jmeter.protocol.http.control.CacheManager;
@@ -789,11 +788,15 @@ public class HTTPHC4Impl extends HTTPHCA
             if(contentEncoding != null && contentEncoding.length() == 0) {
                 contentEncoding = null;
             }
+            Charset charset = null;
+            if(contentEncoding != null) {
+                charset = Charset.forName(contentEncoding);
+            }
 
             // Write the request to our own stream
             MultipartEntity multiPart = new MultipartEntity(
                     getDoBrowserCompatibleMultipart() ? HttpMultipartMode.BROWSER_COMPATIBLE
: HttpMultipartMode.STRICT,
-                            null, Charset.forName(contentEncoding));
+                            null, charset);
             // Create the parts
             // Add any parameters
             PropertyIterator args = getArguments().iterator();



Mime
View raw message