Summary: | CookieManager broken for AjpSampler | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Rainer Jung <rainer.jung> |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PatchAvailable |
Priority: | P2 | ||
Version: | 2.3.4 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
Patch against trunk
Patch against 2.3.4 |
Created attachment 24856 [details]
Patch against 2.3.4
Good catch, thanks! URL: http://svn.apache.org/viewvc?rev=900635&view=rev Log: Bug 48568 - CookieManager broken for AjpSampler This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2332 |
Created attachment 24855 [details] Patch against trunk We noticed two bugs when using the AjpSampler in combination with CookieManager: A) The cookie header is formatted incorrect and therefore not accepted by the application B) The cookie information is not passed along to the HTTPSampleResult Problem A) comes from formatting the cookie via getStringValue(), which returns something like a tab formatted list of the Cookie attributes. You can use a simple JSP or Servlet containing String cookie=request.getHeader("Cookie"); if (cookie != null) { out.println("Cookie: " + cookie); } to verify this. The fix consists in using an actual Cookie object instead of a generic JMeterProperty and then retrieving Cookie name and value via getName() and getValue(). Problem B) is fixed by calling res.setCookies(). See the atahced patches. Thanks for the great Apache JMeter software!