Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ public static String[] getSourceTypeList() {

private static final String RESPONSE_PARSERS = // list of parsers
JMeterUtils.getProperty("HTTPResponse.parsers");//$NON-NLS-1$

private static final String LOCAL_FILE_PREFIX = "file:"; // $NON-NLS-1$

static {
String[] parsers = JOrphanUtils.split(RESPONSE_PARSERS, " " , true);// returns empty array for null
Expand Down Expand Up @@ -1363,12 +1365,13 @@ private LinkExtractorParser getParser(HTTPSampleResult res)
* @return escaped url
*/
private String escapeIllegalURLCharacters(String url) {
if (url == null || url.toLowerCase().startsWith("file:")) {
if (url == null || url.regionMatches(true, 0, LOCAL_FILE_PREFIX, 0, LOCAL_FILE_PREFIX.length())) {
return url;
}

try {
String escapedUrl = ConversionUtils.escapeIllegalURLCharacters(url);
if (!escapedUrl.equals(url) && log.isDebugEnabled()) {
if (log.isDebugEnabled() && !escapedUrl.equals(url)) {
log.debug("Url '" + url + "' has been escaped to '"
+ escapedUrl + "'. Please correct your webpage.");
}
Expand Down