You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/05/29 15:27:41 UTC

svn commit: r661330 - in /jakarta/jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java xdocs/changes.xml

Author: sebb
Date: Thu May 29 06:27:41 2008
New Revision: 661330

URL: http://svn.apache.org/viewvc?rev=661330&view=rev
Log:
Bug 45007 - fix content length header if content may have been changed

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

Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=661330&r1=661329&r2=661330&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java Thu May 29 06:27:41 2008
@@ -207,7 +207,6 @@
 					"https://([^:/]+)(:"+HTTPConstants.DEFAULT_HTTPS_PORT_STRING+")?"; // $NON-NLS-1$ $NON-NLS-2$
 				noHttpsResult = noHttpsResult.replaceAll(HTTPS_HOST, "http://$1"); // $NON-NLS-1$
 				result.setResponseData(noHttpsResult.getBytes(enc));
-				// TODO adjust Content-Length header
 			}
 
             // Find the page encoding and possibly encodings for forms in the page
@@ -308,7 +307,7 @@
 		String headers = res.getResponseHeaders();
 		String [] headerLines=headers.split(NEW_LINE, 0); // drop empty trailing content
 		int contentLengthIndex=-1;
-		boolean fixContentLength = false;
+		boolean fixContentLength = forcedHTTP;
 		for (int i=0;i<headerLines.length;i++){
 			String line=headerLines[i];
 			String[] parts=line.split(":\\s+",2); // $NON-NLS-1$

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=661330&r1=661329&r2=661330&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Thu May 29 06:27:41 2008
@@ -36,6 +36,7 @@
 <li>Bug 45093 - SizeAssertion did not call getBytes()</li>
 <li>Bug 45007 - Rewrite Location headers when using Proxy HTTPS spoofing</li>
 <li>Use CRLF rather than LF in Proxy when returning headers to the client</li>
+<li>Bug 45007 - fix content length header if content may have been changed</li>
 </ul>
 
 <h3>Improvements</h3>



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org