jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1330236 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java xdocs/changes.xml
Date Wed, 25 Apr 2012 22:10:58 GMT
On 25 April 2012 21:48, Philippe Mouawad <philippe.mouawad@gmail.com> wrote:
> Hello sebb,
> I have a question below.
>
> Regards
> Philippe
>
> On Wed, Apr 25, 2012 at 2:23 PM, <sebb@apache.org> wrote:
>
>> Author: sebb
>> Date: Wed Apr 25 12:23:01 2012
>> New Revision: 1330236
>>
>> URL: http://svn.apache.org/viewvc?rev=1330236&view=rev
>> Log:
>> Bug 53145 - HTTP Sampler - function in path evaluated too early
>>
>> Modified:
>>
>>  jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
>>    jmeter/trunk/xdocs/changes.xml
>>
>> Modified:
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1330236&r1=1330235&r2=1330236&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
>> Wed Apr 25 12:23:01 2012
>> @@ -1333,17 +1333,26 @@ public abstract class HTTPSamplerBase ex
>>      */
>>     public void testStarted() {
>>         JMeterProperty pathP = getProperty(PATH);
>> -        log.debug("path property is a " + pathP.getClass().getName());
>> -        log.debug("path beginning value = " + pathP.getStringValue());
>> -        if (pathP instanceof StringProperty &&
>> pathP.getStringValue().length() > 0) {
>> -            log.debug("Encoding spaces in path");
>> -            pathP.setObjectValue(encodeSpaces(pathP.getStringValue()));
>> -            dynamicPath = false;
>> +        boolean debugEnabled = log.isDebugEnabled();
>> +        if (debugEnabled) {
>> +            log.debug("path property is of type " +
>> pathP.getClass().getName());
>> +        }
>> +        if (pathP instanceof StringProperty) {
>> +            String value = pathP.getStringValue();
>> +            if (value.length() > 0) {
>> +                if (debugEnabled) {
>> +                    log.debug("Encoding spaces in path: "+value);
>> +                }
>> +                pathP.setObjectValue(encodeSpaces(value));
>> +                dynamicPath = false;
>> +                if (debugEnabled) {
>> +                    log.debug("path ending value = " +
>> pathP.getStringValue());
>> +                }
>> +            }
>>
> => Shouldn't there be an else case here setting   dynamicPath = true; ?
>

Looks OK to me.
I only moved the debugs and split the if statement.

>        } else {
>>             log.debug("setting dynamic path to true");
>>             dynamicPath = true;
>>         }
>> -        log.debug("path ending value = " + pathP.getStringValue());
>>     }
>>
>>     /**
>>
>> Modified: jmeter/trunk/xdocs/changes.xml
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1330236&r1=1330235&r2=1330236&view=diff
>>
>> ==============================================================================
>> --- jmeter/trunk/xdocs/changes.xml (original)
>> +++ jmeter/trunk/xdocs/changes.xml Wed Apr 25 12:23:01 2012
>> @@ -94,6 +94,7 @@ Graph Full Results Listener has been rem
>>  <li>Bug 52885 - Proxy : Recording issues with HTTPS, cookies starting
>> with secure are partly truncated</li>
>>  <li>Bug 52886 - Proxy : Recording issues with HTTPS when spoofing is on,
>> secure cookies are not always changed</li>
>>  <li>Bug 52897 - HTTPSampler : Using PUT method with HTTPClient4 and empty
>> Content Encoding and sending files leads to NullPointerException</li>
>> +<li>Bug 53145 - HTTP Sampler - function in path evaluated too early</li>
>>  </ul>
>>
>>  <h3>Other Samplers</h3>
>>
>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.

Mime
View raw message