You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2012/12/02 12:21:13 UTC
svn commit: r1416159 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
Author: pmouawad
Date: Sun Dec 2 11:21:12 2012
New Revision: 1416159
URL: http://svn.apache.org/viewvc?rev=1416159&view=rev
Log:
Bug 53840 - Proxy Recording : Response message: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "" "
Change evaluation order in if condition as per sebb note
Add errorHandlerto avoid errors in System.err
Bugzilla Id: 53840
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java?rev=1416159&r1=1416158&r2=1416159&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java Sun Dec 2 11:21:12 2012
@@ -183,7 +183,9 @@ public class DefaultSamplerCreator exten
// Set the file uploads
sampler.setHTTPFiles(urlConfig.getHTTPFileArgs().asArray());
// used when postData is pure xml (eg. an xml-rpc call) or for PUT
- } else if ((postData.trim().startsWith("<?") || isPotentialXml(postData)) || HTTPConstants.PUT.equals(sampler.getMethod())) {
+ } else if (postData.trim().startsWith("<?")
+ || HTTPConstants.PUT.equals(sampler.getMethod())
+ || isPotentialXml(postData)) {
sampler.addNonEncodedArgument("", postData, "");
} else if (contentType == null ||
(contentType.startsWith(HTTPConstants.APPLICATION_X_WWW_FORM_URLENCODED) &&
@@ -224,6 +226,7 @@ public class DefaultSamplerCreator exten
ErrorDetectionHandler detectionHandler =
new ErrorDetectionHandler();
xmlReader.setContentHandler(detectionHandler);
+ xmlReader.setErrorHandler(detectionHandler);
xmlReader.parse(new InputSource(new StringReader(postData)));
return !detectionHandler.isErrorDetected();
} catch (ParserConfigurationException e) {
@@ -261,7 +264,6 @@ public class DefaultSamplerCreator exten
public boolean isErrorDetected() {
return errorDetected;
}
-
}
/**
* Compute sampler name