Author: pmouawad
Date: Sun Nov 18 22:07:41 2012
New Revision: 1410999
URL: http://svn.apache.org/viewvc?rev=1410999&view=rev
Log:
Bug 54154 - HTTP Proxy Server should not force user to select the type of
Sampler in HTTP Sampler Settings
Bugzilla Id: 54154
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java
jmeter/trunk/xdocs/changes.xml
jmeter/trunk/xdocs/usermanual/component_reference.xml
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=1410999&r1=1410998&r2=1410999&view=diff
==============================================================================
---
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
(original)
+++
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
Sun Nov 18 22:07:41 2012
@@ -78,6 +78,11 @@ public class ProxyControlGui extends Log
private static final long serialVersionUID = 232L;
+ /**
+ * This choice means don't explicitly set Implementation and rely on
default, see Bug 54154
+ */
+ private static final String USE_DEFAULT_HTTP_IMPL = ""; // $NON-NLS-1$
+
private static final String SUGGESTED_EXCLUSIONS =
JMeterUtils.getPropDefault("proxy.excludes.suggested",
".*\\.js;.*\\.css;.*\\.swf;.*\\.gif;.*\\.png;.*\\.jpg;.*\\.bmp"); // $NON-NLS-1$
@@ -229,7 +234,11 @@ public class ProxyControlGui extends Log
model.setCaptureHttpHeaders(httpHeaders.isSelected());
model.setGroupingMode(groupingMode.getSelectedIndex());
model.setAssertions(addAssertions.isSelected());
-
model.setSamplerTypeName(HTTPSamplerFactory.getImplementations()[samplerTypeName.getSelectedIndex()]);
+ if(samplerTypeName.getSelectedIndex()<
HTTPSamplerFactory.getImplementations().length) {
+
model.setSamplerTypeName(HTTPSamplerFactory.getImplementations()[samplerTypeName.getSelectedIndex()]);
+ } else {
+ model.setSamplerTypeName(USE_DEFAULT_HTTP_IMPL);
+ }
model.setSamplerRedirectAutomatically(samplerRedirectAutomatically.isSelected());
model.setSamplerFollowRedirects(samplerFollowRedirects.isSelected());
model.setUseKeepAlive(useKeepAlive.isSelected());
@@ -614,6 +623,7 @@ public class ProxyControlGui extends Log
for (String s : HTTPSamplerFactory.getImplementations()){
m.addElement(s);
}
+ m.addElement(USE_DEFAULT_HTTP_IMPL);
samplerTypeName = new JComboBox(m);
samplerTypeName.setSelectedItem(HTTPSamplerFactory.DEFAULT_CLASSNAME);
samplerTypeName.addItemListener(this);
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java?rev=1410999&r1=1410998&r2=1410999&view=diff
==============================================================================
---
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java
(original)
+++
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerFactory.java
Sun Nov 18 22:07:41 2012
@@ -69,7 +69,7 @@ public final class HTTPSamplerFactory {
*/
public static HTTPSamplerBase newInstance(String alias) {
if (alias ==null || alias.length() == 0) {
- alias = DEFAULT_CLASSNAME;
+ return new HTTPSamplerProxy();
}
if (alias.equals(HTTP_SAMPLER_JAVA) || alias.equals(IMPL_JAVA)) {
return new HTTPSamplerProxy(IMPL_JAVA);
Modified: jmeter/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1410999&r1=1410998&r2=1410999&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Nov 18 22:07:41 2012
@@ -188,6 +188,7 @@ and right angle bracket (>) in search
<li><bugzilla>54031</bugzilla> - Add tooltip to running/total threads
indicator </li>
<li>Webservice (SOAP) Request has been deprecated</li>
<li><bugzilla>54161</bugzilla> - Proxy : be able to create binary sampler for
x-www-form-urlencoded POST request</li>
+<li><bugzilla>54154</bugzilla> - HTTP Proxy Server should not force user to
select the type of Sampler in HTTP Sampler Settings</li>
</ul>
<h2>Non-functional changes</h2>
Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL:
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1410999&r1=1410998&r2=1410999&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Sun Nov 18 22:07:41
2012
@@ -138,6 +138,7 @@ Latency is set to the time it takes to l
<li>HTTPClient3.1 - uses Apache Commons HttpClient 3.1.
This is no longer being developed, and support for this may be dropped
in a future JMeter release.</li>
<li>HTTPClient4 - uses Apache HttpComponents HttpClient 4.x.</li>
+ <li>Blank Value - does not set implementationon HTTP Samplers, so
relies on HTTP Request Defaults if present or on jmeter.httpsampler property
defined in jmeter.properties</li>
</ul>
</ul>
</p>