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 2006/06/07 21:55:11 UTC

svn commit: r412511 - /jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java

Author: sebb
Date: Wed Jun  7 12:55:10 2006
New Revision: 412511

URL: http://svn.apache.org/viewvc?rev=412511&view=rev
Log:
Change how default parser is handled

Modified:
    jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java

Modified: jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=412511&r1=412510&r2=412511&view=diff
==============================================================================
--- jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (original)
+++ jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java Wed Jun  7 12:55:10 2006
@@ -197,18 +197,18 @@
     // Not synch, but it is not modified after creation
     
     private static final String RESPONSE_PARSERS= // list of parsers
-        JMeterUtils.getPropDefault("HTTPResponse.parsers",//$NON-NLS-1$
-                "htmlParser");  //$NON-NLS-1$ (this is the original one)
+        JMeterUtils.getProperty("HTTPResponse.parsers");//$NON-NLS-1$
+
     static{
-        String []parsers = JOrphanUtils.split(RESPONSE_PARSERS, " " , true);
+        String []parsers = JOrphanUtils.split(RESPONSE_PARSERS, " " , true);// returns empty array for null
         for (int i=0;i<parsers.length;i++){
             final String parser = parsers[i];
-            String classname=JMeterUtils.getProperty(parser+".className");
+            String classname=JMeterUtils.getProperty(parser+".className");//$NON-NLS-1$
             if (classname == null){
                 log.info("Cannot find .className property for "+parser+", using default");
                 classname="";
             }
-            String typelist=JMeterUtils.getProperty(parser+".types");
+            String typelist=JMeterUtils.getProperty(parser+".types");//$NON-NLS-1$
             if (typelist != null){
                 String []types=JOrphanUtils.split(typelist, " " , true);
                 for (int j=0;j<types.length;j++){
@@ -219,6 +219,10 @@
             } else {
                 log.warn("Cannot find .types property for "+parser);
             }
+        }
+        if (parsers.length==0){ // revert to previous behaviour
+        	parsersForType.put("text/html", ""); //$NON-NLS-1$ //$NON-NLS-2$
+        	log.info("No response parsers defined: text/html only will be scanned for embedded resources");
         }
     }
     



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