Author: sebb Date: Thu Apr 21 01:34:08 2011 New Revision: 1095588 URL: http://svn.apache.org/viewvc?rev=1095588&view=rev Log: Fix bug introduced when classes re-organised for HC4: need to set default parameters, not an instance that is then abandoned!
Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java?rev=1095588&r1=1095587&r2=1095588&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java (original) +++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java Thu Apr 21 01:34:08 2011 @@ -57,8 +57,10 @@ import org.apache.commons.httpclient.met import org.apache.commons.httpclient.methods.multipart.Part; import org.apache.commons.httpclient.methods.multipart.PartBase; import org.apache.commons.httpclient.methods.multipart.StringPart; +import org.apache.commons.httpclient.params.DefaultHttpParams; import org.apache.commons.httpclient.params.HttpClientParams; import org.apache.commons.httpclient.params.HttpMethodParams; +import org.apache.commons.httpclient.params.HttpParams; import org.apache.commons.httpclient.protocol.Protocol; import org.apache.commons.io.input.CountingInputStream; import org.apache.jmeter.protocol.http.control.AuthManager; @@ -88,6 +90,8 @@ public class HTTPHC3Impl extends HTTPHCA private static final long serialVersionUID = 241L; + private static final String HTTP_AUTHENTICATION_PREEMPTIVE = "http.authentication.preemptive"; // $NON-NLS-1$ + private static final boolean canSetPreEmptive; // OK to set pre-emptive auth? private static final ThreadLocal<Map<HostConfiguration, HttpClient>> httpClients = @@ -119,7 +123,7 @@ public class HTTPHC3Impl extends HTTPHCA // } // Set default parameters as needed - HttpClientParams params = new HttpClientParams(); + HttpParams params = DefaultHttpParams.getDefaultParams(); // Process Commons HttpClient parameters file String file=JMeterUtils.getProperty("httpclient.parameters.file"); // $NON-NLS-1$ @@ -129,7 +133,7 @@ public class HTTPHC3Impl extends HTTPHCA // If the pre-emptive parameter is undefined, then we can set it as needed // otherwise we should do what the user requested. - canSetPreEmptive = params.isAuthenticationPreemptive(); + canSetPreEmptive = params.getParameter(HTTP_AUTHENTICATION_PREEMPTIVE) == null; // Handle old-style JMeter properties try { --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@jakarta.apache.org For additional commands, e-mail: notifications-h...@jakarta.apache.org