jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1441978 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java xdocs/changes.xml
Date Sun, 03 Feb 2013 22:24:08 GMT
Author: pmouawad
Date: Sun Feb  3 22:24:08 2013
New Revision: 1441978

URL: http://svn.apache.org/viewvc?rev=1441978&view=rev
Log:
Bug 54482 - HC fails to follow redirects with non-encoded chars
Bugzilla Id: 54482

Modified:
    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/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1441978&r1=1441977&r2=1441978&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
Sun Feb  3 22:24:08 2013
@@ -69,6 +69,7 @@ import org.apache.http.client.methods.Ht
 import org.apache.http.client.params.ClientPNames;
 import org.apache.http.client.params.CookiePolicy;
 import org.apache.http.client.protocol.ResponseContentEncoding;
+import org.apache.http.client.utils.URIBuilder;
 import org.apache.http.conn.params.ConnRoutePNames;
 import org.apache.http.conn.scheme.Scheme;
 import org.apache.http.conn.scheme.SchemeRegistry;
@@ -231,7 +232,15 @@ public class HTTPHC4Impl extends HTTPHCA
         
         HttpRequestBase httpRequest = null;
         try {
-            URI uri = url.toURI();
+            URIBuilder builder = 
+                    new URIBuilder()
+                .setScheme(url.getProtocol())
+                .setHost(url.getHost())
+                .setPort(url.getPort())
+                .setUserInfo(url.getUserInfo())
+                .setPath(url.getPath())
+                .setQuery(url.getQuery());
+            URI uri = builder.build();
             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=1441978&r1=1441977&r2=1441978&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Feb  3 22:24:08 2013
@@ -90,6 +90,7 @@ This does not affect JMeter operation.
 
 <h3>HTTP Samplers and Proxy</h3>
 <ul>
+<li><bugzilla>54482</bugzilla> - HC fails to follow redirects with non-encoded
chars</li>
 </ul>
 
 <h3>Other Samplers</h3>



Mime
View raw message