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

            Bug ID: 62261
           Summary: HTTP POST Request does not consistently override
                    content type set by parent Header Manager
           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...@gmx.net
  Target Milestone: ---

Though, the entire content type handling with POST is misdesigned, it is
misdesigned inconsistently.

Postive case:
1. Add a header manager to test plan with "Content-Type: text/plain"
2. Add a thread group
2.1. Add a header manager to TG with "Content-Type: "
2.2. Add an HTTP POST request
3. Run the plan

Result tree says:
> Request Headers:
> Connection: keep-alive
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 0
> Host: blnn719x.ww004.siemens.net
> User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_161)

So the previously set content type has been dropped.

Now, modifiy the plan with "Use multipart/form-data for POST" and rerun the
test plan.

Result tree says:
> Request Headers:
> Connection: keep-alive
> Content-Type: 
> Content-Length: 37
> Host: blnn719x.ww004.siemens.net
> User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_161)

As you can see, the content type header is not reset. The behavior for POST is
inconsistent. The only reasonable workaround is to use a Groovy preprocessor.

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

Reply via email to