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 2007/05/04 16:45:13 UTC
svn commit: r535265 -
/jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
Author: sebb
Date: Fri May 4 07:45:12 2007
New Revision: 535265
URL: http://svn.apache.org/viewvc?view=rev&rev=535265
Log:
Skip javascript: links; log full sampler for match
Modified:
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
Modified: jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java?view=diff&rev=535265&r1=535264&r2=535265
==============================================================================
--- jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java (original)
+++ jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java Fri May 4 07:45:12 2007
@@ -87,12 +87,8 @@
if (index == -1) {
index = 0;
}
- try {
- if (log.isDebugEnabled()) {
- log.debug("Check for matches against: "+sampler.getUrl().toExternalForm());
- }
- } catch (MalformedURLException e) {
- log.debug("BAD URL"+e.getMessage());
+ if (log.isDebugEnabled()) {
+ log.debug("Check for matches against: "+sampler.toString());
}
html = (Document) HtmlParsingUtils.getDOM(responseText.substring(index));
addAnchorUrls(html, result, sampler, potentialLinks);
@@ -190,6 +186,9 @@
continue;
}
String hrefStr = namedItem.getNodeValue();
+ if (hrefStr.startsWith("javascript:")) { // $NON-NLS-1$
+ continue; // No point trying these
+ }
try {
HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(hrefStr, new URL(result.getURL(), base));
newUrl.setMethod(HTTPSamplerBase.GET);
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org