final byte[] responseData = res.getResponseData();
if (responseData.length > 0){ // Bug 39205
String parserName = getParserClass(res);
if(parserName != null)
{
final HTMLParser parser =
parserName.length() > 0 ? // we have a name
HTMLParser.getParser(parserName)
:
HTMLParser.getParser(); // we don't; use the default parser
urls = parser.getEmbeddedResourceURLs(responseData, res.getURL(), res.getDataEncodingWithDefault());
}
}
} catch (HTMLParseException e) {
// Don't break the world just because this failed:
res.addSubResult(errorResult(e, new HTTPSampleResult(res)));