You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2016/06/21 18:14:22 UTC
svn commit: r1749583 - in /jmeter/trunk:
src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java
xdocs/changes.xml
Author: fschumacher
Date: Tue Jun 21 18:14:22 2016
New Revision: 1749583
URL: http://svn.apache.org/viewvc?rev=1749583&view=rev
Log:
Display original query in RequestViewHTTP when decoding fails.
Based on patch by Teemu Vesala (teemu.vesala at qentinel.com)
Bugzilla Id: 59712
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java
jmeter/trunk/xdocs/changes.xml
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java?rev=1749583&r1=1749582&r2=1749583&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java Tue Jun 21 18:14:22 2016
@@ -340,22 +340,21 @@ public class RequestViewHTTP implements
*
* @param query
* to decode
- * @return a decode query string
+ * @return the decoded query string, if it can be url-decoded. Otherwise the original
+ * query will be returned.
*/
public static String decodeQuery(String query) {
if (query != null && query.length() > 0) {
try {
- query = URLDecoder.decode(query, CHARSET_DECODE); // better ISO-8859-1 than UTF-8
- } catch(IllegalArgumentException e) {
- log.warn("Error decoding query, maybe your request parameters should be encoded:" + query, e);
- return null;
- } catch (UnsupportedEncodingException uee) {
- log.warn("Error decoding query, maybe your request parameters should be encoded:" + query, uee);
- return null;
- }
- return query;
+ return URLDecoder.decode(query, CHARSET_DECODE); // better ISO-8859-1 than UTF-8
+ } catch (IllegalArgumentException | UnsupportedEncodingException e) {
+ log.warn(
+ "Error decoding query, maybe your request parameters should be encoded:"
+ + query, e);
+ return query;
+ }
}
- return null;
+ return "";
}
@Override
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1749583&r1=1749582&r2=1749583&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Tue Jun 21 18:14:22 2016
@@ -136,6 +136,8 @@ Summary
<h3>Listeners</h3>
<ul>
+ <li><bug>59712</bug>Display original query in RequestView when decoding fails. Based on a patch by
+ Teemu Vesala (teemu.vesala at qentinel.com)</li>
</ul>
<h3>Timers, Assertions, Config, Pre- & Post-Processors</h3>
@@ -172,6 +174,7 @@ Summary
<li>Felix Draxler (felix.draxler at sap.com)</li>
<li>Antonio Gomes Rodrigues (ra0077 at gmail.com)</li>
<li>Graham Russell (graham at ham1.co.uk)</li>
+<li>Teemu Vesala (teemu.vesala at qentinel.com)</li>
</ul>
<p>We also thank bug reporters who helped us improve JMeter. <br/>
For this release we want to give special thanks to the following reporters for the clear reports and tests made after our fixes:</p>