jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1467074 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java xdocs/changes.xml
Date Thu, 11 Apr 2013 20:24:48 GMT
Author: pmouawad
Date: Thu Apr 11 20:24:48 2013
New Revision: 1467074

URL: http://svn.apache.org/r1467074
Log:
Rollback to fix of bugs:
54482- HC fails to follow redirects with non-encoded chars
54293- JMeter rejects html tags '<' in query params as invalid when they are accepted
by the browser
54142- HTTP Proxy Server throws an exception when path contains "|" character 

Bugzilla Id: 54482,54293,54142

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java?rev=1467074&r1=1467073&r2=1467074&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
Thu Apr 11 20:24:48 2013
@@ -23,8 +23,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.InetAddress;
-import java.net.URI;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLDecoder;
 import java.util.ArrayList;
@@ -72,7 +70,6 @@ import org.apache.jmeter.protocol.http.c
 import org.apache.jmeter.protocol.http.control.CacheManager;
 import org.apache.jmeter.protocol.http.control.CookieManager;
 import org.apache.jmeter.protocol.http.control.HeaderManager;
-import org.apache.jmeter.protocol.http.util.ConversionUtils;
 import org.apache.jmeter.protocol.http.util.EncoderCache;
 import org.apache.jmeter.protocol.http.util.HTTPArgument;
 import org.apache.jmeter.protocol.http.util.HTTPConstants;
@@ -206,25 +203,23 @@ public class HTTPHC3Impl extends HTTPHCA
 
         res.sampleStart(); // Count the retries as well in the time
         try {
-            URI uri = ConversionUtils.sanitizeUrl(url);
-            String uriAsString = uri.toString();
             // May generate IllegalArgumentException
             if (method.equals(HTTPConstants.POST)) {
-                httpMethod = new PostMethod(uriAsString);
+                httpMethod = new PostMethod(urlStr);
             } else if (method.equals(HTTPConstants.PUT)){
-                httpMethod = new PutMethod(uriAsString);
+                httpMethod = new PutMethod(urlStr);
             } else if (method.equals(HTTPConstants.HEAD)){
-                httpMethod = new HeadMethod(uriAsString);
+                httpMethod = new HeadMethod(urlStr);
             } else if (method.equals(HTTPConstants.TRACE)){
-                httpMethod = new TraceMethod(uriAsString);
+                httpMethod = new TraceMethod(urlStr);
             } else if (method.equals(HTTPConstants.OPTIONS)){
-                httpMethod = new OptionsMethod(uriAsString);
+                httpMethod = new OptionsMethod(urlStr);
             } else if (method.equals(HTTPConstants.DELETE)){
-                httpMethod = new DeleteMethod(uriAsString);
+                httpMethod = new DeleteMethod(urlStr);
             } else if (method.equals(HTTPConstants.GET)){
-                httpMethod = new GetMethod(uriAsString);
+                httpMethod = new GetMethod(urlStr);
             } else if (method.equals(HTTPConstants.PATCH)){
-                httpMethod = new EntityEnclosingMethod(uriAsString) {
+                httpMethod = new EntityEnclosingMethod(urlStr) {
                     @Override
                     public String getName() { // HC3.1 does not have the method
                         return "PATCH";
@@ -351,10 +346,6 @@ public class HTTPHC3Impl extends HTTPHCA
             }
             errorResult(e, res);
             return res;
-        } catch (URISyntaxException e) { // e.g. some kinds of invalid URL
-            res.sampleEnd();
-            errorResult(e, res);
-            return res;
         } catch (IOException e) {
             res.sampleEnd();
             // pick up headers if failed to execute the request

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1467074&r1=1467073&r2=1467074&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Thu Apr 11 20:24:48 2013
@@ -98,7 +98,6 @@ import org.apache.jmeter.protocol.http.c
 import org.apache.jmeter.protocol.http.control.CacheManager;
 import org.apache.jmeter.protocol.http.control.CookieManager;
 import org.apache.jmeter.protocol.http.control.HeaderManager;
-import org.apache.jmeter.protocol.http.util.ConversionUtils;
 import org.apache.jmeter.protocol.http.util.EncoderCache;
 import org.apache.jmeter.protocol.http.util.HC4TrustAllSSLSocketFactory;
 import org.apache.jmeter.protocol.http.util.HTTPArgument;
@@ -232,7 +231,7 @@ public class HTTPHC4Impl extends HTTPHCA
         
         HttpRequestBase httpRequest = null;
         try {
-            URI uri = ConversionUtils.sanitizeUrl(url);
+            URI uri = url.toURI();
             if (method.equals(HTTPConstants.POST)) {
                 httpRequest = new HttpPost(uri);
             } else if (method.equals(HTTPConstants.PUT)) {

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1467074&r1=1467073&r2=1467074&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Apr 11 20:24:48 2013
@@ -96,9 +96,6 @@ of JMeter crash (very rare). To revert t
 
 <h3>HTTP Samplers and Proxy</h3>
 <ul>
-<li><bugzilla>54482</bugzilla> - HC fails to follow redirects with non-encoded
chars</li>
-<li><bugzilla>54293</bugzilla> - JMeter rejects html tags '&lt;' in
query params as invalid when they are accepted by the browser</li>
-<li><bugzilla>54142</bugzilla> - HTTP Proxy Server throws an exception
when path contains "|" character </li>
 <li><bugzilla>54627</bugzilla> - JMeter Proxy GUI: Type of sampler settings
takes the whole screen with when there are samplers with long name</li>
 <li><bugzilla>54629</bugzilla> - HTMLParser does not extract &lt;object&gt;
tag urls</li>
 </ul>



Mime
View raw message