Return-Path: X-Original-To: apmail-jmeter-dev-archive@minotaur.apache.org Delivered-To: apmail-jmeter-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A7D72DAFC for ; Mon, 3 Sep 2012 15:36:55 +0000 (UTC) Received: (qmail 2952 invoked by uid 500); 3 Sep 2012 15:36:55 -0000 Delivered-To: apmail-jmeter-dev-archive@jmeter.apache.org Received: (qmail 2921 invoked by uid 500); 3 Sep 2012 15:36:55 -0000 Mailing-List: contact dev-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jmeter.apache.org Delivered-To: mailing list dev@jmeter.apache.org Received: (qmail 2913 invoked by uid 99); 3 Sep 2012 15:36:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2012 15:36:55 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vc0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2012 15:36:50 +0000 Received: by vcdd16 with SMTP id d16so6233452vcd.2 for ; Mon, 03 Sep 2012 08:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XJpNu+CDH4aGbk6IK7GxlYR1VtLc/Ri7z3kCkh9vSa4=; b=YgS23dkzLpgZ2hF9JActIaHVqGLzy0NNc0u28u8rFOo0A7wZ2iFTNA9J3aBjBcGu0x t2u24cOYHUOErJChIo3ylAGa0nKfa0hrKkN7VWmf9xhRnCGXJ4Z0FNTLRQumkdqqymu+ p1Rx8Tola0OgrH9CEvQNAWbX0pDggG9VSoS6JEoN4K+g1O0x9kSf0cTzddaoFtec48l7 D6yITfpbEIJQhNIvKRO0DlySPrJ1OUWfHLop27LIoIhzZXFVmzA/j7krdv+1e30Pid5u PTKAii8eW6sdt9wsJYSRP6DrmplJ4+nuWhJ3hV+DoOnnNS52I4tXdmJlk6tGEMRFcNZD TpkA== MIME-Version: 1.0 Received: by 10.52.69.174 with SMTP id f14mr10331530vdu.17.1346686589529; Mon, 03 Sep 2012 08:36:29 -0700 (PDT) Received: by 10.58.58.197 with HTTP; Mon, 3 Sep 2012 08:36:29 -0700 (PDT) In-Reply-To: References: Date: Mon, 3 Sep 2012 16:36:29 +0100 Message-ID: Subject: Re: HTTP with custom methods From: sebb To: dev@jmeter.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 3 September 2012 16:21, Christopher Brind wrote: > Hi, > > Thanks for the reply. > > On Mon, Sep 3, 2012 at 4:13 PM, sebb wrote: >> >> On 3 September 2012 14:51, Christopher Brind wrote: >> > Hi, >> > >> > My current customer has a requirement to use JMeter for testing their web >> > application which uses custom HTTP methods beyond the list presented in the >> > HTTP sampler GUI. To support this I have ended up forking JMeter and >> > implementing this in house. I have been asked to see if the JMeter >> > community will accept the changes back in to the main source tree so that >> > my customer doesn't need to maintain the fork. >> > >> > The changes are: >> > >> > - If the HC4 implementation is selected set the JLabelledChoice for >> > "method" to editable >> > - Changed the ordering of reading and writing of the test element >> > properties (because being able to set the method text on the choice depends >> > on it being editable) >> > - Changed HTTPHC4Impl to create a new anonymous instance of HttpRequestBase >> > which simply passes through the entered method and URI >> >> I assume these new methods don't support body content? > > That's correct. It wasn't a requirement for my customer, but I can > see how that might be useful. Let me check with the customer to see > how they feel about me adding support for that (in my own time if > necessary). OK. No need to do so (unless you want) as I expect the change will be useful as is - if only to see what happens if clients send unusual requests! The easiest way to support body content is to treat the method much the same way as PUT or PATCH. [POST handling is more complicated because of form-data-encoding] The simplest would be to send content iff it is provided, otherwise send URL parameters if any. This would not need any further changes to the GUI, which is already rather crowded. > >> >> > There did not appear to be any unit tests to update for this and the >> > existing unit tests still pass. >> > >> > Please let me know if this is desirable and I will send through the diff. >> >> Seems reasonable, but we would need to see the exact changes. >> >> The best way to provide patches and and enhancement code is via the >> issue tracker; JMeter uses Bugzilla for this. >> So please create an account, and attach the patches (diff -u format >> please). For new files, these can be plain source rather than diff >> format. > > Will do. > > Cheers, > Chris > >> >> > Thanks in advance. >> > >> > Regards, >> > Chris