jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1424450 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java xdocs/changes.xml
Date Thu, 20 Dec 2012 13:16:33 GMT
Author: pmouawad
Date: Thu Dec 20 13:16:32 2012
New Revision: 1424450

URL: http://svn.apache.org/viewvc?rev=1424450&view=rev
Log:
Bug 54331 - AjpSampler throws null pointer on GET request that are protected
Bugzilla Id: 54331

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

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java?rev=1424450&r1=1424449&r2=1424450&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java
Thu Dec 20 13:16:32 2012
@@ -419,16 +419,20 @@ public class AjpSampler extends HTTPSamp
     }
 
     private void setNextBodyChunk() throws IOException {
-        int len = body.available();
-        if(len < 0) {
-            len = 0;
-        } else if(len > MAX_SEND_SIZE) {
-            len = MAX_SEND_SIZE;
-        }
-        outpos = 4;
         int nr = 0;
-        if(len > 0) {
-            nr = body.read(outbuf, outpos+2, len);
+        if(body != null) {
+            int len = body.available();
+            if(len < 0) {
+                len = 0;
+            } else if(len > MAX_SEND_SIZE) {
+                len = MAX_SEND_SIZE;
+            }
+            outpos = 4;
+            if(len > 0) {
+                nr = body.read(outbuf, outpos+2, len);
+            }
+        } else {
+            outpos = 4;
         }
         setInt(nr);
         outpos += nr;

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1424450&r1=1424449&r2=1424450&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Dec 20 13:16:32 2012
@@ -123,6 +123,7 @@ and right angle bracket (&gt;) in search
 <li><bugzilla>53995</bugzilla> - AbstractJDBCTestElement shares PreparedStatement
between multi-threads</li>
 <li><bugzilla>54119</bugzilla> - HTTP 307 response is not redirected</li>
 <li><bugzilla>54326</bugzilla> - AjpSampler send file in post throws FileNotFoundException</li>
+<li><bugzilla>54331</bugzilla> - AjpSampler throws null pointer on GET
request that are protected</li>
 </ul>
 
 <h3>Controllers</h3>



Mime
View raw message