Author: sebb
Date: Tue Nov 6 12:02:20 2007
New Revision: 592535
URL: http://svn.apache.org/viewvc?rev=592535&view=rev
Log:
Move fixup of headers to finally block, so it is always done even if there was
a problem communicating with the client
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
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=592535&r1=592534&r2=592535&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
Tue Nov 6 12:02:20 2007
@@ -193,15 +193,6 @@
addFormEncodings(result, pageEncoding);
writeToClient(result, new
BufferedOutputStream(clientSocket.getOutputStream()));
- /*
- * We don't want to store any cookies in the generated
test plan
- */
- headers.removeHeaderNamed("cookie");// Always remove
cookies // $NON-NLS-1$
- headers.removeHeaderNamed("Authorization");// Always
remove authorization // $NON-NLS-1$
- // Remove additional headers
- for(int i=0; i < headersToRemove.length; i++){
- headers.removeHeaderNamed(headersToRemove[i]);
- }
} catch (UnknownHostException uhe) {
log.warn("Server Not Found.", uhe);
writeErrorToClient(HttpReplyHdr.formServerNotFound());
@@ -212,6 +203,17 @@
if (log.isDebugEnabled()) {
log.debug("Will deliver sample " +
sampler.getName());
}
+ /*
+ * We don't want to store any cookies in the generated
test plan
+ */
+ if (headers != null) {
+ headers.removeHeaderNamed("cookie");// Always
remove cookies // $NON-NLS-1$
+ headers.removeHeaderNamed("Authorization");//
Always remove authorization // $NON-NLS-1$
+ // Remove additional headers
+ for(int i=0; i < headersToRemove.length; i++){
+
headers.removeHeaderNamed(headersToRemove[i]);
+ }
+ }
target.deliverSampler(sampler, new TestElement[] {
captureHttpHeaders ? headers : null }, result);
try {
clientSocket.close();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]