You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2014/10/12 22:13:30 UTC

svn commit: r1631251 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java xdocs/changes.xml

Author: pmouawad
Date: Sun Oct 12 20:13:29 2014
New Revision: 1631251

URL: http://svn.apache.org/r1631251
Log:
Bug 57078 - LagartoBasedHTMLParser fails to parse page that contains input with no type
Bugzilla Id: 57078

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java?rev=1631251&r1=1631250&r2=1631251&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java Sun Oct 12 20:13:29 2014
@@ -133,7 +133,8 @@ public class LagartoBasedHtmlParser exte
                     extractAttribute(tag, ATT_DATA);                 
                 } else if (tag.nameEquals(TAG_INPUT)) {
                     // we check the input tag type for image
-                    if (TagUtil.equalsIgnoreCase(ATT_IS_IMAGE, tag.getAttributeValue(ATT_TYPE))) {
+                    CharSequence type = tag.getAttributeValue(ATT_TYPE);
+                    if (type != null && TagUtil.equalsIgnoreCase(ATT_IS_IMAGE, type)) {
                         // then we need to download the binary
                         extractAttribute(tag, ATT_SRC);
                     }
@@ -149,7 +150,7 @@ public class LagartoBasedHtmlParser exte
                 } else if (tag.nameEquals(TAG_LINK)) {
                     CharSequence relAttribute = tag.getAttributeValue(ATT_REL);
                     // Putting the string first means it works even if the attribute is null
-                    if (TagUtil.equalsIgnoreCase(STYLESHEET,relAttribute)) {
+                    if (relAttribute != null && TagUtil.equalsIgnoreCase(STYLESHEET,relAttribute)) {
                         extractAttribute(tag, ATT_HREF);
                     }
                 } else {

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1631251&r1=1631250&r2=1631251&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Oct 12 20:13:29 2014
@@ -217,6 +217,7 @@ for details on configuring this componen
 <li><bugzilla>56809</bugzilla> - JMSSampler closes InitialContext too early. Contributed by Bradford Hovinen (hovinen at gmail.com)</li>
 <li><bugzilla>56761</bugzilla> - JMeter tries to stop already stopped JMS connection and displays "The connection is closed"</li>
 <li><bugzilla>57068</bugzilla> - No error thrown when negative duration is entered in Test Action</li>
+<li><bugzilla>57078</bugzilla> - LagartoBasedHTMLParser fails to parse page that contains input with no type</li>
 </ul>
 
 <h3>Controllers</h3>