Bug 51980 - HtmlParserHTMLParser double-counts images used in links
HtmlParserHTMLParser double-counts images used in links
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.5.1
PC Windows XP
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-10-06 15:09 UTC by Sebb
Modified: 2011-10-06 15:15 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2011-10-06 15:09:48 UTC
When HTMLParser is used to parse embedded resources of the form

<a href="http://jakarta.apache.org/"><img src="./images/jakarta-logo.gif"></a>

it adds the image to the list of URLs twice.

This is because the <img> is parsed as part of the <a> (Link) tag as well as being parsed as a part of the nested parsing of composite tags, such as the link tag.

The fix is to ignore the nested image when processing link tags.
Comment 1 Sebb 2011-10-06 15:15:08 UTC
URL: http://svn.apache.org/viewvc?rev=1179657&view=rev
Log:
Bug 51980 - HtmlParserHTMLParser double-counts images used in links

Modified:
   jakarta/jmeter/trunk/bin/testfiles/HTMLParserTestCase.html
   jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
   jakarta/jmeter/trunk/xdocs/changes.xml