Summary: | Adding a HttpClient 4 cookie implementation in JMeter. Cookie Manager has now the default HC3.1 implementation and a new choice HC4 implementation (compliant with IPv6 address) | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Milamber <milamber> |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | p.mouawad |
Priority: | P2 | ||
Version: | Nightly (Please specify date) | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 51512 | ||
Attachments: |
Proposal patch to add a HC4 impl and modfy CookieManager to add the choose
Ne cookie manager with HC4/HC3 HC4 cookie manager with IPv6 address (localhost) |
Description
Milamber
2012-08-21 15:06:36 UTC
I think the continued use of the HC3.1 Cookie implementation is probably historical. When HC4 was originally added, it was in a state of flux, so we changed the minimum possible. I suspect we no may longer need the HC 3.1 Cookie implementation at all. Created attachment 29259 [details]
Proposal patch to add a HC4 impl and modfy CookieManager to add the choose
Created attachment 29260 [details]
Ne cookie manager with HC4/HC3
Created attachment 29261 [details]
HC4 cookie manager with IPv6 address (localhost)
This test case don't work with the HC3 impl.
@sebb The new Implementation field in Cookie Manager has made to have the same thing that the HTTP Request (type of HTTP implementation). And have a transitional period to move from HC3 to HC4 (perhaps there has some bug in HC4 cookie API?) I can commit this work or not. If it's better to replace the HC3CookieHandler by the new HC4CookieHandler without the implementation's field in Cookie Manager, I can do this. Note to keep in mind. In HC3CookieHandler. Method: addCookieFromHeader(CookieManager cookieManager, boolean checkCookies, String cookieHeader, URL url) Have this lines: cookie.isPathAttributeSpecified(), cookie.isDomainAttributeSpecified() And Method: makeCookie(Cookie jmc) Have this lines: ret.setPathAttributeSpecified(jmc.isPathSpecified()); ret.setDomainAttributeSpecified(jmc.isDomainSpecified()); In HC4 API, no traces for is|set|PathAttributeSpecified() and is|set|DomainAttributeSpecified() Thus in HC4CookieHandler, I've not enter this lines... I don't know if it's a bug or not necessary. I reviewed patch it seems fine for me. Great you implemented this !!! IPv6 support lack in JMeter is now solved. (In reply to comment #5) > @sebb > > The new Implementation field in Cookie Manager has made to have the same > thing that the HTTP Request (type of HTTP implementation). > And have a transitional period to move from HC3 to HC4 (perhaps there has > some bug in HC4 cookie API?) > > I can commit this work or not. If it's better to replace the > HC3CookieHandler by the new HC4CookieHandler without the implementation's > field in Cookie Manager, I can do this. If you have already done the work, then the implementation might as well be selectable. If/when we drop HC3.1 entirely it can be disabled/removed. TODO: update docs. URL: http://svn.apache.org/viewvc?rev=1376320&view=rev Log: Adding a HttpClient 4 cookie implementation in JMeter. Cookie Manager has now the default HC3.1 implementation and a new choice HC4 implementation (compliant with IPv6 address) and Bug 51512 - Cookies aren't inserted into HTTP request with IPv6 Host header Bugzilla Id: 53755 Added: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HC4CookieHandler.java (with props) Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassTools.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java jmeter/trunk/xdocs/changes.xml Doc update done. URL: http://svn.apache.org/viewvc?rev=1376459&view=rev Log: Update doc for new Response Time Graph, Aggregate Graph and Cookie Manager elements Bugzilla Id: 53718,53755 Removed: jmeter/trunk/docs/images/screenshots/http-config/http-cookie-manager.gif jmeter/trunk/xdocs/images/screenshots/http-config/http-cookie-manager.gif Modified: jmeter/trunk/docs/images/screenshots/aggregate_graph.png jmeter/trunk/docs/images/screenshots/aggregate_graph_settings.png jmeter/trunk/docs/images/screenshots/http-config/http-cookie-manager.png jmeter/trunk/docs/images/screenshots/response_time_graph.png jmeter/trunk/docs/images/screenshots/response_time_graph_settings.png jmeter/trunk/xdocs/images/screenshots/aggregate_graph.png jmeter/trunk/xdocs/images/screenshots/aggregate_graph_settings.png jmeter/trunk/xdocs/images/screenshots/http-config/http-cookie-manager.png jmeter/trunk/xdocs/images/screenshots/response_time_graph.png jmeter/trunk/xdocs/images/screenshots/response_time_graph_settings.png jmeter/trunk/xdocs/usermanual/component_reference.xml This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2896 |