Author: sebb
Date: Mon Oct 6 04:04:11 2008
New Revision: 702092
URL: http://svn.apache.org/viewvc?rev=702092&view=rev
Log:
Fixup content encoding retrieval
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java?rev=702092&r1=702091&r2=702092&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
Mon Oct 6 04:04:11 2008
@@ -318,7 +318,9 @@
multiPart.writeRequest(bos);
bos.flush();
// We get the posted bytes using the encoding used to create it
- postedBody.append(new
String(bos.toByteArray(),post.getRequestCharSet()));
+ postedBody.append(new String(bos.toByteArray(),
+ contentEncoding == null ? "US-ASCII" // $NON-NLS-1$
this is the default used by HttpClient
+ : contentEncoding));
bos.close();
// For all the file multiparts, we must revert the hiding of
@@ -403,7 +405,7 @@
}
postBody.append(value);
}
- StringRequestEntity requestEntity = new
StringRequestEntity(postBody.toString(),
post.getRequestHeader(HEADER_CONTENT_TYPE).getValue(),
post.getRequestCharSet());
+ StringRequestEntity requestEntity = new
StringRequestEntity(postBody.toString(),
post.getRequestHeader(HEADER_CONTENT_TYPE).getValue(), contentEncoding);
post.setRequestEntity(requestEntity);
}
else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]