Summary: | HTTP recorder - Exception parsing javascript file | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | doa |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | doa |
Priority: | P2 | Keywords: | FixedInTrunk |
Version: | 5.3 | ||
Target Milestone: | JMETER_5.4 | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | Skip javascript (and JSON) in charset guessing by forms |
Description
doa
2020-08-07 10:47:19 UTC
Which version of JMeter, JDK, OS are you using? JMeter: 5.3 (also tried with the current nightly, same problem) OS: Windows 10 Java: Adopt OpenJDK 64Bit 8.0.242.08 Btw i just found out that when i load the unminified version of the js file everything works as expected. Does it help, if you exclude the Javascript resources from recording? In the code it looks like we skip only binary types in o.a.j.protocol.http.proxy.Proxy#addFormEncodings and hope that jsoup will throw an HTMLParseException on any error. That seems not to be the case in with this Javascript code. So we should probably narrow the parsing down a bit more and exclude javascript from the parsing, too. Would you be able to patch and compile a JMeter version for yourself? Created attachment 37385 [details]
Skip javascript (and JSON) in charset guessing by forms
No i'm not able to patch and compile my own version. But its not a huge problem since my "workaround" is good enough for now. I'm happy if your patch makes it into a future version. Thx for the quick help. Would you be able to test next nightly and report if it solves your problem? commit 81a6d678d725e98d5325b8d9429345f40d35f845 AuthorDate: Sat Aug 8 19:31:22 2020 +0200 Exclude Javascript and JSON from parsing for charsets from forms by proxy JSoup currently has problems parsing some non HTML code - for which it was probably never intended. So skip known not HTML resources in the proxy recording logic, when character encodings for forms are extracted. Bugzilla Id: 64653 --- .../apache/jmeter/protocol/http/proxy/Proxy.java | 21 ++++++++++++++++++++- xdocs/changes.xml | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) Works with r1812-a1bc13f1d626fc9d58bb9d5124a72bd07237374d (Nighlty from 2020-08-10). Thank you very much for the fast fix. Great work. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5380 |