sebb        2004/05/27 17:36:22

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/sampler
                        Tag: rel-2_0 HTTPSampler2.java HTTPSampler.java
  Log:
  Only extract URLs from text/html
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.8.2.5   +5 -2      
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
  
  Index: HTTPSampler2.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java,v
  retrieving revision 1.8.2.4
  retrieving revision 1.8.2.5
  diff -u -r1.8.2.4 -r1.8.2.5
  --- HTTPSampler2.java 21 May 2004 00:23:33 -0000      1.8.2.4
  +++ HTTPSampler2.java 28 May 2004 00:36:22 -0000      1.8.2.5
  @@ -699,10 +699,13 @@
           Iterator urls= null;
           try
           {
  +             if (res.getContentType().toLowerCase().indexOf("text/html") != -1)
  +             {
               urls=
                   HTMLParser.getParser().getEmbeddedResourceURLs(
                       res.getResponseData(),
                       res.getURL());
  +             }
           }
           catch (HTMLParseException e)
           {
  
  
  
  1.91.2.3  +5 -2      
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.91.2.2
  retrieving revision 1.91.2.3
  diff -u -r1.91.2.2 -r1.91.2.3
  --- HTTPSampler.java  13 Apr 2004 18:31:56 -0000      1.91.2.2
  +++ HTTPSampler.java  28 May 2004 00:36:22 -0000      1.91.2.3
  @@ -708,10 +708,13 @@
           Iterator urls= null;
           try
           {
  +             if (res.getContentType().toLowerCase().indexOf("text/html") != -1)
  +             {
               urls=
                   HTMLParser.getParser().getEmbeddedResourceURLs(
                       res.getResponseData(),
                       res.getURL());
  +             }
           }
           catch (HTMLParseException e)
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to