Bug 45479 - Support for multiple HTTP Header Manager nodes
Summary: Support for multiple HTTP Header Manager nodes
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.3.3
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-24 16:15 UTC by Andrew Alsup
Modified: 2008-10-02 12:52 UTC (History)
0 users



Attachments
SVN diff of my changes (5.09 KB, patch)
2008-07-24 16:15 UTC, Andrew Alsup
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Alsup 2008-07-24 16:15:11 UTC
Created attachment 22314 [details]
SVN diff of my changes

I've added a small bit of code to support multiple "HTTP Header Manager"
nodes at different scopes.

PREVIOUS:
When HTTPSamplerBase.setHeaderManager(..) is called, it was already
checking if a more locally scoped HeaderManager had already been
assigned.  If so, log a warning and overwrite with the new HeaderManager.

NEW:
The HeaderManager object now supports a merge(..) operation, allowing it
to merge its values with another HeaderManager's.  The result is a new
HeaderManager object with values from both -> with more local-scoped
values take precedence over more distant-scoped values.  So, when
HTTPSamplerBase.setHeaderManager(..) detects a more locally scoped
HeaderManager already assigned, it stores the merged result.

I created one new interface "TestMergeable", anticipating that this
could also be useful for other config elements, such as HTTP Cookie Manager.

The attached .diff is based on current SVN trunk (as of 2008-07-23 @
20:00:00 EDT).
Comment 1 Sebb 2008-10-02 12:52:53 UTC
Thanks for the patch, applied to SVN trunk:

URL: http://svn.apache.org/viewvc?rev=701225&view=rev
Log:
Bug 45479 - Support for multiple HTTP Header Manager nodes


I did not use the TestMergeable interface.
The merge() method in HeaderManager cannot return a HeaderManager - the compiler complains that it is not compatible with TestMergeable. Also, the interface is not used by HttpSamplerBase.
Comment 2 The ASF infrastructure team 2022-09-24 20:37:41 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2140