You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2018/04/05 21:25:41 UTC

[Bug 62252] HTTP header merging logic does not correspond to the documentation

https://bz.apache.org/bugzilla/show_bug.cgi?id=62252

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
             Status|NEW                         |NEEDINFO

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Michael Osipov from comment #0)
> 1. Add a header manager in test plan with "Content-Type: text/plain"
> 2. Add thread group
> 2.1. Add header manager to TG with "Content-Type: "
> 2.2. Add HTTP request to TG with, e.g., PUT
> 3. Run the plan
> 
> Result tree says:
> > Request Headers:
> > Connection: keep-alive
> > Content-Type: 
> > Content-Length: 0
> > Host: ...
> > User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_161)
> 
> The documentation says:
> > JMeter now supports multiple Header Managers. The header entries are merged to form the list for the sampler. If an entry to be merged matches an existing header name, it replaces the previous entry, unless the entry value is empty, in which case any existing entry is removed. This allows one to set up a default set of headers, and apply adjustments to particular samplers.
> 
> Checking the source code:
> https://github.com/apache/jmeter/blob/
> bdb88cb72a5b71f5bbc6f35a03f36890268b468b/src/protocol/http/org/apache/jmeter/
> protocol/http/control/HeaderManager.java#L262-L282
> 
> I cannot see that on an empty value the parent header is removed. A
> non-existing header and a empty value header are different things.
> 
> See lengthly discussion in Jetty:
> https://github.com/eclipse/jetty.project/issues/1116
> 
> Basically, there is no remove here, but a mere override.

Yes documentation is wrong.

What is your opinion ? 
How should we understand the jetty discussion ? Should we be able to send empty
header value ?

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.