Bug 53145 - HTTP Sampler - function in path evaluated too early

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1330236 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: de6a0a7635
This commit is contained in:
Sebastian Bazley 2012-04-25 12:23:01 +00:00
parent 5acb2d4ecb
commit 6114ca33e5
2 changed files with 17 additions and 7 deletions

View File

@ -1333,17 +1333,26 @@ public abstract class HTTPSamplerBase extends AbstractSampler
*/ */
public void testStarted() { public void testStarted() {
JMeterProperty pathP = getProperty(PATH); JMeterProperty pathP = getProperty(PATH);
log.debug("path property is a " + pathP.getClass().getName()); boolean debugEnabled = log.isDebugEnabled();
log.debug("path beginning value = " + pathP.getStringValue()); if (debugEnabled) {
if (pathP instanceof StringProperty && pathP.getStringValue().length() > 0) { log.debug("path property is of type " + pathP.getClass().getName());
log.debug("Encoding spaces in path"); }
pathP.setObjectValue(encodeSpaces(pathP.getStringValue())); if (pathP instanceof StringProperty) {
dynamicPath = false; 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());
}
}
} else { } else {
log.debug("setting dynamic path to true"); log.debug("setting dynamic path to true");
dynamicPath = true; dynamicPath = true;
} }
log.debug("path ending value = " + pathP.getStringValue());
} }
/** /**

View File

@ -94,6 +94,7 @@ Graph Full Results Listener has been removed.
<li>Bug 52885 - Proxy : Recording issues with HTTPS, cookies starting with secure are partly truncated</li> <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 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 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> </ul>
<h3>Other Samplers</h3> <h3>Other Samplers</h3>