Author: pmouawad
Date: Wed Nov 16 07:28:45 2016
New Revision: 1769932

URL: http://svn.apache.org/viewvc?rev=1769932&view=rev
Log:
Bug 60376 - Http Test Script Recorder : If deflate is used by server then 
recording may break application
Bugzilla Id: 60376

Modified:
    
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
    
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java
    jmeter/trunk/xdocs/changes.xml

Modified: 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=1769932&r1=1769931&r2=1769932&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java 
(original)
+++ 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java 
Wed Nov 16 07:28:45 2016
@@ -530,8 +530,11 @@ public class Proxy extends Thread {
                     continue;
                 }
                 if 
(HTTPConstants.HEADER_CONTENT_ENCODING.equalsIgnoreCase(parts[0])
-                    &&
-                    HTTPConstants.ENCODING_GZIP.equalsIgnoreCase(parts[1])
+                    && (HTTPConstants.ENCODING_GZIP.equalsIgnoreCase(parts[1])
+                            || 
HTTPConstants.ENCODING_DEFLATE.equalsIgnoreCase(parts[1])
+                            // TODO BROTLI not supported by HC4, so no 
uncompression would occur, add it once available
+                            // || 
HTTPConstants.ENCODING_BROTLI.equalsIgnoreCase(parts[1]) 
+                            )
                 ){
                     headerLines[i] = null; // We don't want this passed on to 
browser
                     fixContentLength = true;

Modified: 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java?rev=1769932&r1=1769931&r2=1769932&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java
 (original)
+++ 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java
 Wed Nov 16 07:28:45 2016
@@ -64,7 +64,11 @@ public interface HTTPConstantsInterface
     String HEADER_CONTENT_ENCODING = "content-encoding"; // $NON-NLS-1$
     String HTTP_1_1 = "HTTP/1.1"; // $NON-NLS-1$
     String HEADER_SET_COOKIE = "set-cookie"; // $NON-NLS-1$
+    // Brotli compression not supported yet by HC4 4.5.2 , but to be added
+    String ENCODING_BROTLI = "br"; // $NON-NLS-1$
+    String ENCODING_DEFLATE = "deflate"; // $NON-NLS-1$
     String ENCODING_GZIP = "gzip"; // $NON-NLS-1$
+
     String HEADER_CONTENT_DISPOSITION = "Content-Disposition"; // $NON-NLS-1$
     String HEADER_CONTENT_TYPE = "Content-Type"; // $NON-NLS-1$
     String HEADER_CONTENT_LENGTH = "Content-Length"; // $NON-NLS-1$

Modified: jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1769932&r1=1769931&r2=1769932&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Wed Nov 16 07:28:45 2016
@@ -303,6 +303,7 @@ This allows you to update Think Times fr
     <li><bug>58888</bug>HTTP(S) Test Script Recorder (ProxyControl) does not 
add TestElement's returned by <code>SamplerCreator#createChildren()</code></li>
     <li><bug>59902</bug>Https handshake failure when setting 
<code>httpclient.socket.https.cps</code> property</li>
     <li><bug>60084</bug>JMeter 3.0 embedded resource URL is silently 
encoded</li>
+    <li><bug>60376</bug>Http Test Script Recorder : If deflate is used by 
server then recording may break application</li>
  </ul>
 
 <h3>Other Samplers</h3>


Reply via email to