Author: milamber
Date: Mon Aug 1 07:33:36 2011
New Revision: 1152696
URL: http://svn.apache.org/viewvc?rev=1152696&view=rev
Log:
When record http with HC4. The type 2 isn't recognized by proxy.
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=1152696&r1=1152695&r2=1152696&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Mon Aug 1 07:33:36 2011
@@ -140,8 +140,9 @@ public class ProxyControl extends Generi
private static final int GROUPING_IN_TRANSACTION_CONTROLLERS = 4;
// Original numeric order (we now use strings)
- private static final String SAMPLER_TYPE_HTTP_SAMPLER = "0";
- private static final String SAMPLER_TYPE_HTTP_SAMPLER2 = "1";
+ private static final String SAMPLER_TYPE_HTTP_SAMPLER_JAVA = "0";
+ private static final String SAMPLER_TYPE_HTTP_SAMPLER_HC3_1 = "1";
+ private static final String SAMPLER_TYPE_HTTP_SAMPLER_HC4 = "2";
private long lastTime = 0;// When was the last sample seen?
@@ -285,10 +286,12 @@ public class ProxyControl extends Generi
public String getSamplerTypeName() {
// Convert the old numeric types - just in case someone wants to
reload the workbench
String type = getPropertyAsString(SAMPLER_TYPE_NAME);
- if (SAMPLER_TYPE_HTTP_SAMPLER.equals(type)){
+ if (SAMPLER_TYPE_HTTP_SAMPLER_JAVA.equals(type)){
type = HTTPSamplerFactory.IMPL_JAVA;
- } else if (SAMPLER_TYPE_HTTP_SAMPLER2.equals(type)){
+ } else if (SAMPLER_TYPE_HTTP_SAMPLER_HC3_1.equals(type)){
type = HTTPSamplerFactory.IMPL_HTTP_CLIENT3_1;
+ } else if (SAMPLER_TYPE_HTTP_SAMPLER_HC4.equals(type)){
+ type = HTTPSamplerFactory.IMPL_HTTP_CLIENT4;
}
return type;
}
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java?rev=1152696&r1=1152695&r2=1152696&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java
Mon Aug 1 07:33:36 2011
@@ -77,7 +77,7 @@ public class HTTPSamplerFactory {
return new HTTPSamplerProxy(IMPL_HTTP_CLIENT3_1);
}
if (alias.equals(IMPL_HTTP_CLIENT4)) {
- return new HTTPSamplerProxy(IMPL_HTTP_CLIENT3_1);
+ return new HTTPSamplerProxy(IMPL_HTTP_CLIENT4);
}
throw new IllegalArgumentException("Unknown sampler type: '" +
alias+"'");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]