Related to Bug 59005 and discussion on dev mailing list: http://mail-archives.apache.org/mod_mbox/jmeter-dev/201602.mbox/%3CCAH9fUpbEmrBqWqau4s0hmCDtwmiiWC_oa81Y9%3DjhP8TJspFpjQ%40mail.gmail.com%3E I am creating the issue (unless it was already created ?) so that we don't forget. Attaching Felix's patch proposal (it is a draft as he wrote) but it shows the intention.
Created attachment 33603 [details] Screenshot
Created attachment 33604 [details] Felix patch showing the intention (cleanup needed as he wrote)
Created attachment 33606 [details] Allow any method as a webdav method This patch adds a property "httpsampler.user_defined_methods" which can be used to add pre-defined methods to the method list. The property is added to jmeter.properties as an example with filled in methods for RFC3253. Documentation has been updated to include a reference to the property. The class HttpWebdav is still in use and I don't think, that we can remove it since it holds the used method.
Date: Mon Feb 29 19:20:08 2016 New Revision: 1732937 URL: http://svn.apache.org/viewvc?rev=1732937&view=rev Log: HTTP Request : Make Method field editable so that additional methods (Webdav) can be added easily Bugzilla Id: 59083 Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpWebdav.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/component_reference.xml
Date: Mon Feb 29 19:36:14 2016 New Revision: 1732939 URL: http://svn.apache.org/viewvc?rev=1732939&view=rev Log: Revert changes made by r1732937 At least HTTPHC4Impl uses HttpWebDav#isWebdavMethod in a way, that is incompatible to this change. Was: HTTP Request : Make Method field editable so that additional methods (Webdav) can be added easily Bugzilla Id: 59083 Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/core/org/apache/jmeter/gui/util/JLabeledRadioI18N.java (props changed) jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpWebdav.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/images/asf-logo.gif (props changed) jmeter/trunk/xdocs/usermanual/component_reference.xml
Date: Thu Mar 3 20:55:33 2016 New Revision: 1733521 URL: http://svn.apache.org/viewvc?rev=1733521&view=rev Log: HTTP Request : Make Method field editable so that additional methods (Webdav) can be added easily Bugzilla Id: 59083 Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpWebdav.java jmeter/trunk/xdocs/usermanual/component_reference.xml
Date: Thu Mar 3 21:29:40 2016 New Revision: 1733530 URL: http://svn.apache.org/viewvc?rev=1733530&view=rev Log: Bug 59083 - HTTP Request : Make Method field editable so that additional methods (Webdav) can be added easily Bugzilla Id: 59083 Modified: jmeter/trunk/xdocs/changes.xml
If you open a existing jmx script with a HTTP Sampler with POST method (not the default GET method), and you click one or several time on the Del button (near Method), you have this error: 2016/03/05 12:40:31 ERROR - jmeter.JMeter: Uncaught exception: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1 at java.util.Vector.removeElementAt(Unknown Source) at javax.swing.DefaultComboBoxModel.removeElementAt(Unknown Source) at javax.swing.JComboBox.removeItemAt(Unknown Source) at org.apache.jorphan.gui.JLabeledChoice$DeleteListener.actionPerformed(JLabeledChoice.java:297) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
Hi, I think this needs further thinking as removing a Method that is used by other samplers like GET or POST makes rapidly the behaviour very hard to guess. Regards
I didn't see the "add" and "del" buttons. They are not really useful in my mind, since we would have to guard the standard http methods and the added http methods would be lost on save anyway. Would it be ok to add another param to JLabeledChoice to inhibit the addition of the buttons, or should I add another JComboBox derivate?
Created attachment 33644 [details] Use JComboBox for http method selection
This look good to me.
Created attachment 33645 [details] Make HC3 Impl aware of all possible http methods
Isn't this similar to Bug 59131? Add/Del buttons don't make sense for the list of methods.
I added another ctor to JLabeledChoice to suppress the buttons. Still seems to work OK: URL: http://svn.apache.org/viewvc?rev=1734185&view=rev Log: HTTP Request : Make Method field editable so that additional methods (Webdav) can be added easily Don't display Add/Del buttons Bugzilla Id: 59083 Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/gui/JLabeledChoice.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java I guess JComboBox would have worked just as well; this seemed to be somewhat simpler.
Closing as it is fixed.
Date: Fri Mar 18 16:04:21 2016 New Revision: 1735627 URL: http://svn.apache.org/viewvc?rev=1735627&view=rev Log: Add testcase for HttpWebdav. Bugzilla Id: 59083 Added: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHttpWebdav.java (with props)
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3863