Author: pmouawad
Date: Thu Nov 7 14:42:28 2013
New Revision: 1539664
URL: http://svn.apache.org/r1539664
Log:
Bug 55756 - HTTP Mirror Server : Add ability to set Headers
Bugzilla Id: 55756
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
jmeter/trunk/xdocs/changes.xml
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java?rev=1539664&r1=1539663&r2=1539664&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
Thu Nov 7 14:42:28 2013
@@ -101,6 +101,17 @@ public class HttpMirrorThread implements
out.write("Content-Type: text/plain".getBytes(ISO_8859_1)); //$NON-NLS-1$
out.write(CRLF);
+ // Look for special Cookie request
+ String headersValue = getRequestHeaderValue(headerString, "X-SetHeaders"); //$NON-NLS-1$
+ if (headersValue != null) {
+ String[] headersToSet = headersValue.split("\\|");
+ for (String string : headersToSet) {
+ out.write(string.getBytes(ISO_8859_1));
+ out.write(CRLF);
+ }
+ }
+ out.write(CRLF);
+
// Look for special Response Length header
String responseLengthValue = getRequestHeaderValue(headerString, "X-ResponseLength");
//$NON-NLS-1$
int responseLength=-1;
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1539664&r1=1539663&r2=1539664&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Nov 7 14:42:28 2013
@@ -199,6 +199,7 @@ A workaround is to use a Java 7 update 4
<ul>
<li><bugzilla>55693</bugzilla> - Add a "Save as Test Fragment" option</li>
<li><bugzilla>55753</bugzilla> - Improve FilePanel behaviour to start from
the value set in Filename field if any. Contributed by UBIK Load Pack (support at ubikloadpack.com)</li>
+<li><bugzilla>55756</bugzilla> - HTTP Mirror Server : Add ability to set
Headers</li>
</ul>
<ch_section>Non-functional changes</ch_section>
|