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 12:10:59 UTC
[Bug 62261] New: HTTP POST Request does not consistently override
content type set by parent Header Manager
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-06@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.
[Bug 62261] HTTP POST Request does not consistently override content
type set by parent Header Manager
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62261
--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Can I close this one as fixed since you opened Bug 62279 ?
Thanks
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62261] HTTP POST Request does not consistently override content
type set by parent Header Manager
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62261
--- Comment #4 from Michael Osipov <19...@gmx.net> ---
(In reply to Philippe Mouawad from comment #3)
> Can I close this one as fixed since you opened Bug 62279 ?
> Thanks
Yes, go ahead. Trunk is consistent. Though, I would expect it to be inverted
consistent, but this is maybe a matter of taste.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62261] HTTP POST Request does not consistently override content
type set by parent Header Manager
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62261
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> ---
Hello,
In last nightly build, I get the following:
First request:
Connection: keep-alive
Content-Type:
Content-Length: 0
Host: localhost:8081
User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_161)
Second Request:
Connection: keep-alive
Content-Type:
Content-Length: 41
Host: localhost:8081
User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_161)
Would you expect that when Multipart form is checked it overrides parent set
Header Content-Type ?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62261] HTTP POST Request does not consistently override content
type set by parent Header Manager
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62261
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |JMETER_4.1
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62261] HTTP POST Request does not consistently override content
type set by parent Header Manager
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62261
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Fixed within Bug 62260
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62261] HTTP POST Request does not consistently override content
type set by parent Header Manager
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62261
--- Comment #2 from Michael Osipov <19...@gmx.net> ---
(In reply to Philippe Mouawad from comment #1)
> Hello,
> In last nightly build, I get the following:
>
> First request:
> Connection: keep-alive
> Content-Type:
> Content-Length: 0
> Host: localhost:8081
> User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_161)
>
>
> Second Request:
> Connection: keep-alive
> Content-Type:
> Content-Length: 41
> Host: localhost:8081
> User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_161)
This is now consistent. Looks good.
> Would you expect that when Multipart form is checked it overrides parent set
> Header Content-Type ?
I would expect it from both, when the HTTP POST sets the context type,
regardless application/x-www-form-urlencoded or multipart/form-data.., it
deliberately overrides the conent type set by a parent. The problem with
application/x-www-form-urlencoded is that people do not see that it is set by
default. It should behave like a header manager for this thread group.
--
You are receiving this mail because:
You are the assignee for the bug.