jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1574701 - 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 Wed, 05 Mar 2014 22:33:33 GMT
Author: sebb
Date: Wed Mar  5 22:33:32 2014
New Revision: 1574701

URL: http://svn.apache.org/r1574701
Log:
NPE if jmeter.httpclient.strict_rfc2616=true and location is not absolute
Bugzilla Id: 56222

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=1574701&r1=1574700&r2=1574701&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
Wed Mar  5 22:33:32 2014
@@ -327,8 +327,9 @@ public class HTTPHC3Impl extends HTTPHCA
                     if(!STRICT_RFC_2616 && !(redirectLocation.startsWith("http://")||redirectLocation.startsWith("https://")))
{
                         redirectLocation = ConversionUtils.buildFullUrlFromRelative(url,
redirectLocation);
                     }
-
-                    res.setRedirectLocation(ConversionUtils.sanitizeUrl(new URL(redirectLocation)).toString());
+                    res.setRedirectLocation(redirectLocation); // in case sanitising fails
+                    final URL redirectUrl = new URL(redirectLocation);
+                    res.setRedirectLocation(ConversionUtils.sanitizeUrl(redirectUrl).toString());
                 } catch (Exception e) {
                     log.error("Error sanitizing URL:"+headerLocation.getValue()+", message:"+e.getMessage());
                 }

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=1574701&r1=1574700&r2=1574701&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
Wed Mar  5 22:33:32 2014
@@ -364,6 +364,7 @@ public class HTTPHC4Impl extends HTTPHCA
                     redirectLocation = ConversionUtils.buildFullUrlFromRelative(url, redirectLocation);
                 }
                 try {
+                    res.setRedirectLocation(redirectLocation); // in case sanitising fails
                     final URL redirectUrl = new URL(redirectLocation);
                     res.setRedirectLocation(ConversionUtils.sanitizeUrl(redirectUrl).toString());
                 } catch (Exception e) {

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1574701&r1=1574700&r2=1574701&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Wed Mar  5 22:33:32 2014
@@ -124,6 +124,7 @@ A workaround is to use a Java 7 update 4
 <ul>
 <li><bugzilla>55998</bugzilla> - HTTP recording – Replacing port value
by user defined variable does not work</li>
 <li><bugzilla>56178</bugzilla> - keytool error: Invalid escaped character
in AVA: - some characters must be escaped</li>
+<li><bugzilla>56222</bugzilla> - NPE if jmeter.httpclient.strict_rfc2616=true
and location is not absolute</li>
 </ul>
 
 <h3>Other Samplers</h3>



Mime
View raw message