When using HC4 and a URI fragments (i.e. http://en.wikipedia.org/wiki/Fragment_identifier#Examples) then the fragment part ("#Examples") is also sent as part of the HTTP Request. In previous versions: HC3.1 and Java HTTP Samplers this didn't occurred. I am unsure if that's a bug in JMeter or should be handled on HC side, but debugging these samplers in JMeter code, shows that in HC3 we use: httpMethod = new GetMethod(urlStr); ... client.executeMethod(httpMethod); While on HC4 we have a different usage: httpRequest = new HttpGet(uri); ... HttpResponse httpResponse = httpClient.execute(httpRequest, localContext); // perform the sample Seems like the previous implementation excluded the fragment part of the request, following: http://tools.ietf.org/html/rfc3986#section-3.5 while the new one doesn't. This broken behavior causing errors for some applications, i.e. in my test, the application fails to parse and serve the request.
Another point is that I don't specify this fragment as part of the path, it is the application which returns me with a 302 redirect to a URL like this. For now I am working around this, by using the older HC3.1 implementation.
Hello, Thanks for report. Can you attach a document with screenshots of what you get and which url are wrong ? Also a jmeter.log file showing issue if you get any stacktrace ? Thank you
Created attachment 29794 [details] Screen shots comparing HC3 and HC4 behavior Please note the response came from /post.jspa is a 302 redirect to /message/1000#1000 in both cases but the following request (follow redriects) is the problematic one on HC4.
No errors on JMeter side.
Hello, I checked behaviour and JAVA Impl and HC4 behave the same way, they send the fragment. HC3.1 does not.
(In reply to comment #5) > Hello, > I checked behaviour and JAVA Impl and HC4 behave the same way, they send the > fragment. > HC3.1 does not. Oups, no you are right, java removes fragment
Seems to have been submitted previously: https://issues.apache.org/jira/browse/HTTPCLIENT-1177 But I reproduced it and opened: https://issues.apache.org/jira/browse/HTTPCLIENT-1286
Created attachment 29801 [details] Test Plan showing issue
Created attachment 29802 [details] JSP to put in /examples/jsp folder of Tomcat6
Fix will be available as soon as HttpClient-4.2.3 is released
Thanks Philippe - I am following... Happy new year :)
Date: Tue Jan 15 12:58:03 2013 New Revision: 1433386 URL: http://svn.apache.org/viewvc?rev=1433386&view=rev Log: Bug 54351 - HC4 and URI fragments is failing Bugzilla Id: 54351 Modified: jmeter/trunk/build.properties jmeter/trunk/eclipse.classpath jmeter/trunk/res/maven/ApacheJMeter_parent.pom jmeter/trunk/xdocs/changes.xml Date: Tue Jan 15 13:00:14 2013 New Revision: 1433387 URL: http://svn.apache.org/viewvc?rev=1433387&view=rev Log: Bug 54351 - HC4 and URI fragments is failing Bugzilla Id: 54351 Modified: jmeter/trunk/lib/ (props changed)
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3022