Author: milamber
Date: Sun Oct  2 05:49:57 2011
New Revision: 1178129

URL: http://svn.apache.org/viewvc?rev=1178129&view=rev
Log:
Bug 51918 - GZIP compressed traffic produces errors, when multiple connections 
allowed

Modified:
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java?rev=1178129&r1=1178128&r2=1178129&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java 
Sun Oct  2 05:49:57 2011
@@ -47,8 +47,6 @@ public class JMeterContext {
 
     private int threadNum;
 
-    private byte[] readBuffer = null;
-
     private boolean isReinitSubControllers = false;
 
     JMeterContext() {
@@ -66,7 +64,6 @@ public class JMeterContext {
         previousSampler = null;
         samplingStarted = false;
         threadNum = 0;
-        readBuffer = null;
         thread = null;
         isReinitSubControllers = false;
     }
@@ -80,18 +77,6 @@ public class JMeterContext {
         return variables;
     }
 
-    /**
-     * A temporary buffer that can be shared between samplers in a thread.
-     * 
-     * @return the shared read buffer
-     */
-    public byte[] getReadBuffer() {
-        if (readBuffer == null) {
-            readBuffer = new byte[8192];
-        }
-        return readBuffer;
-    }
-
     public void setVariables(JMeterVariables vars) {
         this.variables = vars;
     }

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1178129&r1=1178128&r2=1178129&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
 Sun Oct  2 05:49:57 2011
@@ -1548,7 +1548,7 @@ public abstract class HTTPSamplerBase ex
      */
     public byte[] readResponse(SampleResult sampleResult, InputStream in, int 
length) throws IOException {
 
-        byte[] readBuffer = getThreadContext().getReadBuffer();
+        byte[] readBuffer = new byte[8192]; // 8kB is the (max) size to have 
the latency ('the first packet')
         int bufferSize=32;// Enough for MD5
 
         MessageDigest md=null;

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=1178129&r1=1178128&r2=1178129&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Sun Oct  2 05:49:57 2011
@@ -33,6 +33,7 @@ Earlier changes are detailed in the <a h
 <p>temporary section to collect changes while release vote is in progress</p>
 <ul>
 <li>Bug 51932 - CacheManager does not handle cache-control header with any 
attributes after max-age</li>
+<li>Bug 51918 - GZIP compressed traffic produces errors, when multiple 
connections allowed</li>
 </ul>
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to