Summary: | JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | oliver lloyd <oliver_lloyd> |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | p.mouawad |
Priority: | P4 | ||
Version: | 2.8 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 54482 | ||
Bug Blocks: | |||
Attachments: | Example jmx |
Description
oliver lloyd
2012-12-13 17:01:01 UTC
There are various different ways of doing this in JMeter. Please attach the simplest JMX file which shows how you are creating the request. Created attachment 29752 [details]
Example jmx
Example lines from data file:
facet=true&facet.mincount=1&spellcheck.extendedResults=true&spellcheck.q=miliband+wallace&hl.simple.pre=<strong>&wt=xml&rows=10&version=2.2&spellcheck.accuracy=0.8&start=0&q=miliband+wallace&hl.simple.post=</strong>&qt=sun
wt=xml&rows=3&version=2.2&start=0&q=miliband+wallace&qt=bestLinks&fq=bestlinks_context:sun+OR+bestlinks_context:StoTtoSun
facet=true&facet.mincount=1&spellcheck.extendedResults=true&spellcheck.q=50+shades+of+grey&hl.simple.pre=<strong>&wt=xml&rows=10&version=2.2&spellcheck.accuracy=0.8&start=0&q=50+shades+of+grey&hl.simple.post=</strong>&qt=sun
wt=xml&rows=3&version=2.2&start=0&q=50+shades+of+grey&qt=bestLinks&fq=bestlinks_context:sun+OR+bestlinks_context:StoTtoSun
facet=true&facet.mincount=1&spellcheck.extendedResults=true&spellcheck.q=germans&hl.simple.pre=<strong>&wt=xml&rows=10&version=2.2&spellcheck.accuracy=0.8&start=0&q=germans&hl.simple.post=</strong>&qt=sun
File attached. I looked into this further and I am only seeing this error when using either the HttpClient3.1 & HttpClient4 implementations. The original jmx was using the default - blank - option for this select field which, I presume, uses one of these. When I select Java for the implementation value I do not see this issue and the request is made as expected. It could well be that this is the correct response based on the implementation. I'm happy to close this issue in that case. The JMX file uses the path field to provide the full path, including the parameters. There's no option to encode this - afaik path names don't have to be encoded. So you'll need to encode the relevant parts of the field, or put the parameters into the appropriate fields on the form. The query portion of the URL should always be URL encoded. Fixed within 54482 fix Date: Mon Feb 4 22:03:18 2013 New Revision: 1442393 URL: http://svn.apache.org/viewvc?rev=1442393&view=rev Log: Bug 54293 - JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser Bugzilla Id: 54293 Modified: jmeter/trunk/xdocs/changes.xml Fix introduces regressions on this kind of URLs http://XXX.XXXX.com/toto_titi_tata/CatalogData/ItemImages\IJ\Items_1152\07_06_015_Na_0_0_0_Aucune_0_Na_Na_Batik_s.jpg Date: Thu Apr 11 20:24:48 2013 New Revision: 1467074 URL: http://svn.apache.org/r1467074 Log: Rollback to fix of bugs: 54482- HC fails to follow redirects with non-encoded chars 54293- JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser 54142- HTTP Proxy Server throws an exception when path contains "|" character Bugzilla Id: 54482,54293,54142 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/xdocs/changes.xml Note that Firefox, Opera and Chrome all encode the < and > before contacting the server. IE 8 does not seem to do so; that is probably a bug in IE. I'm inclined to close this as won't fix or perhaps invalid. === BTW, an easy way to check what browsers do is to run the JMeter mirror server, and then use the browser with a URL such as: http://localhost:8081/solr/?<> We should probably document that the behaviour of JMeter for URLs provided as a full path is different from the behaviour where the URL is provided via parameters. I agree with you sebb. Recording this kind of URL by JMeter Proxy leads to correct HTTP Sampler configuration, all parameters are correctly encoded. What is the best place for documenting this ? HTTP Sampler documentation ? URL: http://svn.apache.org/r1511153 Log: Clarify behaviour when path contains a full URL Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3016 |