Hello,
I am running an HTTP test script, where I have the HTTP Samplers loading embedded
resources. On some pages, one of the linked JavaScript files has a function to output
an HTML page. It appears that JMeter is parsing this code as if it is HTML and
following the embedded "links". The offending JavaScript looks like this:
function writePleaseWaitMessage(doc, nextUrl)
{
doc.open();
doc.writeln("<html>");
doc.writeln("<head>");
doc.writeln("<title>Sending E-mail...</title>");
doc.writeln("<link rel=\"stylesheet\" type=\"text/css\"
href=\"/styles/RedFlagStyles.css\">");
doc.writeln("<link rel=\"stylesheet\" type=\"text/css\"
href=\"/styles/tenetstyles.css\">");
doc.writeln("</head>");
doc.writeln("<body class=\"pfsStdBody\"
onLoad=\"javascript:window.location='", nextUrl, "'\">");
// ... and so on
}
The rather strange result in JMeter (Results Tree) is:
+- Root
|- /jsp/logon.jsp
|- (other links from /jsp/logon.jsp)
+- http://localhost/javascript/redflag.js (200)
| |- http://localhost/javascript/redflag.js (200)
| +- http://localhost/javascript/\->http://localhost/javascript/\/ (404)
| |- http://localhost/javascript/\ (302)
| |- http://localhost/javascript/\/ (404)
|- (more links from /jsp/logon.jsp)
When I remove the lines in the JS function that output <link> tags, everything works
as expected. Apparently the HTML parsing code sees "href=\" and tries to follow it.
The correct behavior, though, would be for the parser to ignore it, since the resource
has a MIME type of application/x-javascript. Is this a known issue, or should I create
a Bugzilla report? Also, if someone can point me to a likely place in the code, I'll
investigate it and try to fix it.
Thanks,
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]