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/09/15 11:44:30 UTC

svn commit: r1385035 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java xdocs/changes.xml xdocs/usermanual/component_reference.xml

Author: pmouawad
Date: Sat Sep 15 09:44:29 2012
New Revision: 1385035

URL: http://svn.apache.org/viewvc?rev=1385035&view=rev
Log:
Bug 53874 - View Results Tree : If some parameter containing special characters like % is not encoded, RequestViewHTTP fails with java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern and Response is not displayed

Clarify documentation also
Bugzilla Id: 53874

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/component_reference.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=1385035&r1=1385034&r2=1385035&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 Sat Sep 15 09:44:29 2012
@@ -264,10 +264,13 @@ public class RequestViewHTTP implements 
         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 in parse query:" + query, uee);
+                log.warn("Error decoding query, maybe your request parameters should be encoded:" + query, uee);
                 return null;
-            }
+            } 
             return query;
         }
         return null;

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1385035&r1=1385034&r2=1385035&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sat Sep 15 09:44:29 2012
@@ -129,6 +129,7 @@ The original behaviour can be restored b
 <li><bugzilla>53742</bugzilla> - When jmeter.save.saveservice.sample_count is set to true, elapsed time read by listener is always equal to 0</li>
 <li><bugzilla>53774</bugzilla> - RequestViewRaw does not show headers unless samplerData is non-null</li>
 <li><bugzilla>53802</bugzilla> - IdleTime values are not saved to CSV log</li>
+<li><bugzilla>53874</bugzilla> - View Results Tree : If some parameter containing special characters like % is not encoded, RequestViewHTTP fails with java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern and Response is not displayed</li>
 </ul>
 
 <h3>Timers, Assertions, Config, Pre- &amp; Post-Processors</h3>

Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1385035&r1=1385034&r2=1385035&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Sat Sep 15 09:44:29 2012
@@ -273,8 +273,15 @@ In this case, the server, port and proto
         <b>See below for some further information on parameter handling.</b>
         <p>
         Additionally, you can specify whether each parameter should be URL encoded.  If you are not sure what this
-        means, it is probably best to select it.  If your values contain characters such as &amp;amp; or spaces, or
-        question marks, then encoding is usually required.</p></property>
+        means, it is probably best to select it.  If your values contain characters such as the following then encoding is usually required.:
+        <ul>
+            <li>ASCII Control Chars</li>
+            <li>Non-ASCII characters</li>
+            <li>Reserved characters:URLs use some characters for special use in defining their syntax. When these characters are not used in their special role inside a URL, they need to be encoded, example : '$', '&amp;', '+', ',' , '/', ':', ';', '=', '?', '@'</li>
+            <li>Unsafe characters: Some characters present the possibility of being misunderstood within URLs for various reasons. These characters should also always be encoded, example : ' ', '&lt;', '&gt;', '#', '%', ...</li>
+        </ul>
+        </p>
+        </property>
         <property name="File Path:" required="No">Name of the file to send.  If left blank, JMeter
         does not send a file, if filled in, JMeter automatically sends the request as
         a multipart form request.