You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2014/03/15 12:10:16 UTC
svn commit: r1577830 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
Author: sebb
Date: Sat Mar 15 11:10:16 2014
New Revision: 1577830
URL: http://svn.apache.org/r1577830
Log:
Use constant strings
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
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=1577830&r1=1577829&r2=1577830&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 Sat Mar 15 11:10:16 2014
@@ -25,6 +25,7 @@ import java.io.IOException;
import java.net.Socket;
import java.util.concurrent.TimeUnit;
+import org.apache.jmeter.protocol.http.util.HTTPConstants;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.jorphan.util.JOrphanUtils;
@@ -134,7 +135,7 @@ public class HttpMirrorThread implements
out.write(baos.toByteArray());
}
// Check if we have found a content-length header
- String contentLengthHeaderValue = getRequestHeaderValue(headerString, "Content-Length"); //$NON-NLS-1$
+ String contentLengthHeaderValue = getRequestHeaderValue(headerString, HTTPConstants.HEADER_CONTENT_LENGTH);
if(contentLengthHeaderValue != null) {
contentLength = Integer.parseInt(contentLengthHeaderValue);
}
@@ -143,7 +144,7 @@ public class HttpMirrorThread implements
if(sleepHeaderValue != null) {
TimeUnit.MILLISECONDS.sleep(Integer.parseInt(sleepHeaderValue));
}
- String transferEncodingHeaderValue = getRequestHeaderValue(headerString, "Transfer-Encoding"); //$NON-NLS-1$
+ String transferEncodingHeaderValue = getRequestHeaderValue(headerString, HTTPConstants.TRANSFER_ENCODING);
if(transferEncodingHeaderValue != null) {
isChunked = transferEncodingHeaderValue.equalsIgnoreCase("chunked"); //$NON-NLS-1$
// We only support chunked transfer encoding