jmeter 3.1 r1770033 java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) osx sierra 10.12.3 When running a test jmeter doesn't strip newline when an html tag spans more than a single line. HTML looks like this: <link rel="stylesheet" href="/assets/build/css/app-1488292708 .css"> ^ newline precedes .css The broken request: [09/Mar/2017:14:57:22 +0000] "GET /assets/build/css/app-1489008734%0A.css HTTP/1.1" 404 234 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0" "-"
I believe that the html page is broken. html and xml attribute values are allowed to include space characters.(https://www.w3.org/TR/REC-xml/#NT-AttValue and https://www.w3.org/TR/html51/syntax.html#attribute-value). Looking at https://www.w3.org/TR/1998/REC-xml-19980210#AVNormalize you could argue, that we should normalize the space(s) to one space. But I think you would not want that either. So I tend to close this as "won't fix".
I can see your point, but will note that Chrome, Firefox, Safari, and IE don't subscribe to the same interpretation and correctly (or perhaps incorrectly) strip the newline and load the URI.
You are correct. I checked with chrome and Firefox. The logic send to be: Trim whitespace before and after the links. Remove any newlines. I haven't checked for other whitespace like characters.
(In reply to George Sakhnovsky from comment #0) > jmeter 3.1 r1770033 > java version "1.8.0_74" > Java(TM) SE Runtime Environment (build 1.8.0_74-b02) > osx sierra 10.12.3 > > When running a test jmeter doesn't strip newline when an html tag spans more > than a single line. HTML looks like this: > > <link rel="stylesheet" href="/assets/build/css/app-1488292708 > .css"> > > ^ newline precedes .css > > The broken request: > > [09/Mar/2017:14:57:22 +0000] "GET /assets/build/css/app-1489008734%0A.css > HTTP/1.1" 404 234 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; > rv:51.0) Gecko/20100101 Firefox/51.0" "-" How is this URL used ? Through an extractor or through resources download ? Thanks
Could you test with the next nightly, if the extracted links are correct now? Date: Fri Mar 10 20:12:49 2017 New Revision: 1786427 URL: http://svn.apache.org/viewvc?rev=1786427&view=rev Log: Tests for the Lagarto Html Parser in preparation for bug 60482 Bugzilla Id: 60482 Added: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestLagartoBasedHtmlParser.java (with props) Date: Fri Mar 10 20:19:27 2017 New Revision: 1786434 URL: http://svn.apache.org/viewvc?rev=1786434&view=rev Log: Trim extracted URLs and remove whitespace like newline, carriage return, formfeed and backspace. Bugzilla Id: 60842 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestLagartoBasedHtmlParser.java Date: Fri Mar 10 20:21:59 2017 New Revision: 1786435 URL: http://svn.apache.org/viewvc?rev=1786435&view=rev Log: Mention bug in changelog. Bugzilla Id: 60842 Modified: jmeter/trunk/xdocs/changes.xml
Author: pmouawad Date: Fri Mar 10 22:18:55 2017 New Revision: 1786460 URL: http://svn.apache.org/viewvc?rev=1786460&view=rev Log: Bug 60842 - jmeter chokes on newline Optimize by using static Pattern Factor our code in base class Use code in JSoup based implementation Add Junit tests for it Bugzilla Id: 60842 Added: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestJSoupBasedHtmlParser.java (with props) Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JsoupBasedHtmlParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java
Date: Sat Mar 11 09:15:49 2017 New Revision: 1786497 URL: http://svn.apache.org/viewvc?rev=1786497&view=rev Log: Combine tests to reduce code duplication. Fix html-pseudo code for frame, so that JSoup doesn't choke on it. Bugzilla Id: 60842 Added: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java (with props) Removed: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestJSoupBasedHtmlParser.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestLagartoBasedHtmlParser.java
Date: Sat Mar 11 09:32:31 2017 New Revision: 1786498 URL: http://svn.apache.org/viewvc?rev=1786498&view=rev Log: Add return tag to javadoc Bugzilla Id: 60842 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java
(In reply to Felix Schumacher from comment #8) > Date: Sat Mar 11 09:32:31 2017 > New Revision: 1786498 > > URL: http://svn.apache.org/viewvc?rev=1786498&view=rev > Log: > Add return tag to javadoc > > Bugzilla Id: 60842 > > Modified: > > jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/ > HTMLParser.java Hi Felix, Shouldn't this issue be marked as resolved ? Thanks
(In reply to Philippe Mouawad from comment #9) > (In reply to Felix Schumacher from comment #8) > > Date: Sat Mar 11 09:32:31 2017 > > New Revision: 1786498 > > > > URL: http://svn.apache.org/viewvc?rev=1786498&view=rev > > Log: > > Add return tag to javadoc > > > > Bugzilla Id: 60842 > > > > Modified: > > > > jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/ > > HTMLParser.java > > Hi Felix, > Shouldn't this issue be marked as resolved ? I think so, as we released the fix and no one complained, yet :) I will probably open another bug for the case of url(...) parsing in style-attributes, when no quotes are used. > Thanks
Hi, If we republish docs, then we should update changes.xml to include it. Regards
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4328