jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 62252] New: HTTP header merging logic does not correspond to the documentation
Date Tue, 03 Apr 2018 15:14:27 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=62252

            Bug ID: 62252
           Summary: HTTP header merging logic does not correspond to the
                    documentation
           Product: JMeter
           Version: 4.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: 1983-01-06@gmx.net
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message