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 2007/10/20 15:51:21 UTC

svn commit: r586720 - /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java

Author: sebb
Date: Sat Oct 20 06:51:20 2007
New Revision: 586720

URL: http://svn.apache.org/viewvc?rev=586720&view=rev
Log:
Add NON-NLS markers; avoid unlikely NPE;

Modified:
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java

Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=586720&r1=586719&r2=586720&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java Sat Oct 20 06:51:20 2007
@@ -172,7 +172,7 @@
 
 	/** A number to indicate that the port has not been set. * */
 	public static final int UNSPECIFIED_PORT = 0;
-    public static final String UNSPECIFIED_PORT_AS_STRING = "0";
+    public static final String UNSPECIFIED_PORT_AS_STRING = "0"; // $NON-NLS-1$
 
 	protected final static String NON_HTTP_RESPONSE_CODE = "Non HTTP response code";
 
@@ -198,9 +198,10 @@
 
     protected static final String KEEP_ALIVE = "keep-alive"; // $NON-NLS-1$
 
-    protected static final String TRANSFER_ENCODING = "transfer-encoding";
+    // e.g. "Transfer-Encoding: chunked", which is processed automatically by the underlying protocol
+    protected static final String TRANSFER_ENCODING = "transfer-encoding"; // $NON-NLS-1$
 
-    protected static final String HEADER_CONTENT_ENCODING = "content-encoding";
+    protected static final String HEADER_CONTENT_ENCODING = "content-encoding"; // $NON-NLS-1$
 
     protected static final String HTTP_1_1 = "HTTP/1.1"; // $NON-NLS-1$
 
@@ -442,8 +443,6 @@
     }
 
     public boolean getDoMultipartPost() {
-    	// TODO - Maybe provide a setting in the properties file
-    	// to control the default value for this property
         return getPropertyAsBoolean(DO_MULTIPART_POST, false);
     }
 
@@ -1056,7 +1055,8 @@
 	                            continue;
 	                        }
 	                    }
-	                    if (pattern != null && !localMatcher.matches(urlStrEnc, pattern)) {
+	                    // I don't think localMatcher can be null here, but check just in case
+	                    if (pattern != null && localMatcher != null && !localMatcher.matches(urlStrEnc, pattern)) {
 	                    	continue; // we have a pattern and the URL does not match, so skip it
 	                    }
 	                    HTTPSampleResult binRes = sample(url, GET, false, frameDepth + 1);



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