Author: sebb
Date: Tue Jun 12 09:42:57 2007
New Revision: 546566

URL: http://svn.apache.org/viewvc?view=rev&rev=546566
Log:
Make Automatic redirects the default

Modified:
    
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
    jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml
    jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/component_reference.xml

Modified: 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java?view=diff&rev=546566&r1=546565&r2=546566
==============================================================================
--- 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
 (original)
+++ 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
 Tue Jun 12 09:42:57 2007
@@ -29,6 +29,8 @@
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
 
 import org.apache.jmeter.config.Arguments;
 import org.apache.jmeter.config.ConfigTestElement;
@@ -45,7 +47,7 @@
 /**
  * @author Michael Stover
  */
-public class UrlConfigGui extends JPanel {
+public class UrlConfigGui extends JPanel implements ChangeListener {
        protected HTTPArgumentsPanel argsPanel;
 
        private static String DOMAIN = "domain"; // $NON-NLS-1$
@@ -98,8 +100,8 @@
 
        public void clear() {
                domain.setText(""); // $NON-NLS-1$
-               followRedirects.setSelected(true);
-               autoRedirects.setSelected(false);
+               followRedirects.setSelected(false);
+               autoRedirects.setSelected(true);
         method.setText(HTTPSamplerBase.DEFAULT_METHOD);
                path.setText(""); // $NON-NLS-1$
                port.setText(""); // $NON-NLS-1$
@@ -231,12 +233,12 @@
 
                autoRedirects = new 
JCheckBox(JMeterUtils.getResString("follow_redirects_auto")); //$NON-NLS-1$
                autoRedirects.setName(AUTO_REDIRECTS);
-               autoRedirects.setSelected(false);// will be reset by
-                                                                               
        // configure(TestElement)
+               autoRedirects.setSelected(true);// Default changed in 2.3
+               autoRedirects.addChangeListener(this);
 
                followRedirects = new 
JCheckBox(JMeterUtils.getResString("follow_redirects")); // $NON-NLS-1$
                followRedirects.setName(FOLLOW_REDIRECTS);
-               followRedirects.setSelected(true);
+               followRedirects.setSelected(false);
 
                useKeepAlive = new 
JCheckBox(JMeterUtils.getResString("use_keepalive")); // $NON-NLS-1$
                useKeepAlive.setName(USE_KEEPALIVE);
@@ -299,5 +301,16 @@
                argsPanel = new HTTPArgumentsPanel();
 
                return argsPanel;
+       }
+
+       // Disable follow redirects if Autoredirect is selected
+       public void stateChanged(ChangeEvent e) {
+               if (e.getSource() == autoRedirects){
+                       if (autoRedirects.isSelected()) {
+                               followRedirects.setEnabled(false);
+                       } else {
+                               followRedirects.setEnabled(true);
+                       }
+               }
        }
 }

Modified: jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml?view=diff&rev=546566&r1=546565&r2=546566
==============================================================================
--- jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml (original)
+++ jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml Tue Jun 12 09:42:57 2007
@@ -117,7 +117,7 @@
 Removed deprecated method JMeterUtils.split() - use JOrphanUtils version 
instead.
 </p>
 
-<h4>New functionality:</h4>
+<h4>New functionality/improvements:</h4>
 <ul>
 <li>Added httpclient.parameters.file to allow HttpClient parameters to be 
defined</li>
 <li>Added beanshell.init.file property to run a BeanShell script at 
startup</li>
@@ -167,6 +167,7 @@
 <li>Bug 42506 - JMeter threads all use the same SSL session</li>
 <li>BeanShell elements now support ThreadListener and TestListener 
interfaces</li>
 <li>Bug 42582 - JSON pretty printing in Tree View Listener</li>
+<li>Http Autoredirects are now enabled by default when creating new 
samplers</li>
 </ul>
 
 <h4>Non-functional improvements:</h4>

Modified: 
jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/component_reference.xml?view=diff&rev=546566&r1=546565&r2=546566
==============================================================================
--- jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/component_reference.xml 
(original)
+++ jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/component_reference.xml 
Tue Jun 12 09:42:57 2007
@@ -153,6 +153,7 @@
                <property name="Redirect Automatically" required="Yes">
                Sets the underlying http protocol handler to automatically 
follow redirects,
                so they are not seen by JMeter, and thus will not appear as 
samples.
+               In versions after 2.2, this is now the default.
         </property>
                <property name="Follow Redirects" required="Yes">
                This only has any effect if "Redirect Automatically" is not 
enabled.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to