You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by 黄吉浩 <13...@163.com> on 2014/10/22 16:13:33 UTC

How to commit a patch for jmeter?

sorry for this basic question, but I looked in jmeter.apache.org and read 'Contribute back to the community', but didn't find answer.
there is  Bug 56197https://issues.apache.org/bugzilla/show_bug.cgi?id=56197
part of the bug is:

2) The file will not be sent if the UI is on the 'Body Data' tab, even if this tab has no content.  Simply switching to the Parameters tab causes the file to be included.

I meet this bug in my work either, so I create a patch in eclipse,  I tested it worked, I think I fixed it.
the patch is as following, But I don't know how to submit this patch to the svn reposity?

Index: src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
===================================================================
--- src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java	(revision 1633145)
+++ src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java	(working copy)
@@ -203,9 +203,11 @@
              * On retrival, CRLF is converted back to LF for storage in the text field.
              * See
              */
-            HTTPArgument arg = new HTTPArgument("", text.replaceAll("\n","\r\n"), false);
-            arg.setAlwaysEncoded(false);
-            args.addArgument(arg);
+            if (!text.replaceAll("\n","\r\n").equals("")){ 
+	            HTTPArgument arg = new HTTPArgument("", text.replaceAll("\n","\r\n"), false);
+	            arg.setAlwaysEncoded(false);
+	            args.addArgument(arg);
+            }
         } else {
             args = (Arguments) argsPanel.createTestElement();
             HTTPArgument.convertArgumentsToHTTP(args);

Re:Re: How to commit a patch for jmeter?

Posted by harry_no_spot <13...@163.com>.
thank you. I've submit the patch as an attachment.

在 2014-10-23 16:29:47,"UBIK LOAD PACK Support" <su...@ubikloadpack.com> 写道:
>Hello,
>You best option is to attach your patch (in unified format ) to the
>bugzilla or a new one your create mentionning it is related to 56197
><https://issues.apache.org/bugzilla/show_bug.cgi?id=56197>.
>Ensure your run ant test to check that all Unit Tests pass after your
>change.
>http://jmeter.apache.org/issues.html
>Regards
>@ubikloadpack
>
>On Wed, Oct 22, 2014 at 4:13 PM, 黄吉浩 <13...@163.com> wrote:
>
>>
>> sorry for this basic question, but I looked in jmeter.apache.org and read
>> 'Contribute back to the community', but didn't find answer.
>> there is  Bug 56197
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=56197
>> part of the bug is:
>>
>> 2) The file will not be sent if the UI is on the 'Body Data' tab, even if
>> this tab has no content.  Simply switching to the Parameters tab causes the
>> file to be included.
>>
>> I meet this bug in my work either, so I create a patch in eclipse,  I
>> tested it worked, I think I fixed it.
>> the patch is as following, But I don't know how to submit this patch to
>> the svn reposity?
>>
>> Index:
>> src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
>> ===================================================================
>> ---
>> src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
>>     (revision 1633145)
>> +++
>> src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
>>     (working copy)
>> @@ -203,9 +203,11 @@
>>               * On retrival, CRLF is converted back to LF for storage in
>> the text field.
>>               * See
>>               */
>> -            HTTPArgument arg = new HTTPArgument("",
>> text.replaceAll("\n","\r\n"), false);
>> -            arg.setAlwaysEncoded(false);
>> -            args.addArgument(arg);
>> +            if (!text.replaceAll("\n","\r\n").equals("")){
>> +                   HTTPArgument arg = new HTTPArgument("",
>> text.replaceAll("\n","\r\n"), false);
>> +                   arg.setAlwaysEncoded(false);
>> +                   args.addArgument(arg);
>> +            }
>>          } else {
>>              args = (Arguments) argsPanel.createTestElement();
>>              HTTPArgument.convertArgumentsToHTTP(args);
>>

Re: How to commit a patch for jmeter?

Posted by UBIK LOAD PACK Support <su...@ubikloadpack.com>.
Hello,
You best option is to attach your patch (in unified format ) to the
bugzilla or a new one your create mentionning it is related to 56197
<https://issues.apache.org/bugzilla/show_bug.cgi?id=56197>.
Ensure your run ant test to check that all Unit Tests pass after your
change.
http://jmeter.apache.org/issues.html
Regards
@ubikloadpack

On Wed, Oct 22, 2014 at 4:13 PM, 黄吉浩 <13...@163.com> wrote:

>
> sorry for this basic question, but I looked in jmeter.apache.org and read
> 'Contribute back to the community', but didn't find answer.
> there is  Bug 56197
> https://issues.apache.org/bugzilla/show_bug.cgi?id=56197
> part of the bug is:
>
> 2) The file will not be sent if the UI is on the 'Body Data' tab, even if
> this tab has no content.  Simply switching to the Parameters tab causes the
> file to be included.
>
> I meet this bug in my work either, so I create a patch in eclipse,  I
> tested it worked, I think I fixed it.
> the patch is as following, But I don't know how to submit this patch to
> the svn reposity?
>
> Index:
> src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
> ===================================================================
> ---
> src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
>     (revision 1633145)
> +++
> src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
>     (working copy)
> @@ -203,9 +203,11 @@
>               * On retrival, CRLF is converted back to LF for storage in
> the text field.
>               * See
>               */
> -            HTTPArgument arg = new HTTPArgument("",
> text.replaceAll("\n","\r\n"), false);
> -            arg.setAlwaysEncoded(false);
> -            args.addArgument(arg);
> +            if (!text.replaceAll("\n","\r\n").equals("")){
> +                   HTTPArgument arg = new HTTPArgument("",
> text.replaceAll("\n","\r\n"), false);
> +                   arg.setAlwaysEncoded(false);
> +                   args.addArgument(arg);
> +            }
>          } else {
>              args = (Arguments) argsPanel.createTestElement();
>              HTTPArgument.convertArgumentsToHTTP(args);
>