Author: pmouawad
Date: Mon Jan 14 22:51:41 2019
New Revision: 1851305

URL: http://svn.apache.org/viewvc?rev=1851305&view=rev
Log:
Bug 63048 - JMeter does not retrieve link resources of type "shortcut icon" or 
"icon"

Fix test failure
Bugzilla Id: 63048

Modified:
    
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java
    
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/RegexpHTMLParser.java

Modified: 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java?rev=1851305&r1=1851304&r2=1851305&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java
 (original)
+++ 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java
 Mon Jan 14 22:51:41 2019
@@ -137,7 +137,10 @@ class JTidyHTMLParser extends HTMLParser
                 }
                 break;
             }
-            if (TAG_LINK.equalsIgnoreCase(name) && 
STYLESHEET.equalsIgnoreCase(getValue(attrs, ATT_REL))) {
+            if (TAG_LINK.equalsIgnoreCase(name) && 
+                    (STYLESHEET.equalsIgnoreCase(getValue(attrs, ATT_REL))
+                            || SHORTCUT_ICON.equalsIgnoreCase(getValue(attrs, 
ATT_REL))
+                            || ICON.equalsIgnoreCase(getValue(attrs, 
ATT_REL)))) {
                 urls.addURL(getValue(attrs, ATT_HREF), baseUrl);
                 break;
             }

Modified: 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/RegexpHTMLParser.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/RegexpHTMLParser.java?rev=1851305&r1=1851304&r2=1851305&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/RegexpHTMLParser.java
 (original)
+++ 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/RegexpHTMLParser.java
 Mon Jan 14 22:51:41 2019
@@ -104,7 +104,9 @@ class RegexpHTMLParser extends HTMLParse
             + "|INPUT(?:" + SEP + "(?:SRC" + VALUE
             + "|TYPE\\s*=\\s*(?:\"image\"|'image'|image(?=[\\s>])))){2,}"
             + "|LINK(?:" + SEP + "(?:HREF" + VALUE
-            + 
"|REL\\s*=\\s*(?:\"stylesheet\"|'stylesheet'|stylesheet(?=[\\s>])))){2,}" + ")";
+            + 
"|REL\\s*=\\s*(?:\"stylesheet\"|'stylesheet'|stylesheet(?=[\\s>])))){2,}"
+            + "|REL\\s*=\\s*(?:\"icon\"|'icon'|icon(?=[\\s>])))){2,}"
+            + "|REL\\s*=\\s*(?:\"shortcut icon\"|'shortcut icon'|shortcut 
icon(?=[\\s>])))){2,}" + ")";
 
     // Number of capturing groups possibly containing Base HREFs:
     private static final int NUM_BASE_GROUPS = 3;


Reply via email to