From commits-return-3113-apmail-jmeter-commits-archive=jmeter.apache.org@jmeter.apache.org Sat Mar 15 11:10:43 2014 Return-Path: X-Original-To: apmail-jmeter-commits-archive@minotaur.apache.org Delivered-To: apmail-jmeter-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6412A10B33 for ; Sat, 15 Mar 2014 11:10:43 +0000 (UTC) Received: (qmail 31522 invoked by uid 500); 15 Mar 2014 11:10:43 -0000 Delivered-To: apmail-jmeter-commits-archive@jmeter.apache.org Received: (qmail 31502 invoked by uid 500); 15 Mar 2014 11:10:41 -0000 Mailing-List: contact commits-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jmeter.apache.org Delivered-To: mailing list commits@jmeter.apache.org Received: (qmail 31495 invoked by uid 99); 15 Mar 2014 11:10:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Mar 2014 11:10:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Mar 2014 11:10:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C58BB23889B9; Sat, 15 Mar 2014 11:10:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1577830 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java Date: Sat, 15 Mar 2014 11:10:16 -0000 To: commits@jmeter.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140315111016.C58BB23889B9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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