Created attachment 34199 [details] Simple test plan with HTTPRequest configured to download embedded resources Hi all. I'm migrating all of my tests to JMeter 3.0 and found some that worked fine with earlier versions now fail with 3.0. The problem is with HTTP Request embedded resources. I'm using Java 1.7.0_45 A HTTP Request is configured to download all embedded resources but if a resource contains some special characters (like '+'), they are automatically encoded before being downloaded. This breaks the test. For example, if the parent HTML contains something like this: <img alt="Captcha" class="captcha-image" width="100" height="50" src="/IqGo6EM1JEVZ+MSRJqUSo@qhjVMSFBTs/37/0/1"/> The + is encoded as %20 and is then unreachable. A HTTP 500 is returned instead of the expected content. Is there a configuration parameter to control this? Or is this a bug? I have attached a very simple .jmx file to allow you to easily reproduce the problem. You'll also need to create and deploy a HTML containing the above markup to your web server of choice. Bug 58137 seems like a close match. Did the fix to this bug create the issue I am now seeing? Thank you! Stuart
Hi, Thanks for opening the bug and providing test case. I'll try to analyze it asap this week. Regards
Hello, Your issue is due to fix of Bug 58137. It appears an url containing + is valid, our processing to escapeIllegal leads to the change from + to %20. I think we should switch this part of code to use : https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html But anyway I tested using org.apache.commons.validator.routines.UrlValidator#isValid and your URL appears no to be. I asked a question on commons user mailing list. "Question about URLValidator#isValid" Once I get an answer we'll see what to do. Regards
Created attachment 34230 [details] Patch proposal to fix issue
Author: pmouawad Date: Sun Sep 11 13:39:13 2016 New Revision: 1760249 URL: http://svn.apache.org/viewvc?rev=1760249&view=rev Log: Bug 60084 - JMeter 3.0 embedded resource URL is silently encoded Bugzilla Id: 60084 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java jmeter/trunk/xdocs/changes.xml
Those updates fixed the problem. Thank you Philippe.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4090