Bug 57739 - HTTP GET Requests erase "Content-length" Header
Summary: HTTP GET Requests erase "Content-length" Header
Status: RESOLVED DUPLICATE of bug 60358
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2015-03-23 01:57 UTC by Zaki_XL
Modified: 2017-02-26 20:15 UTC (History)
1 user (show)

JMeter TEST (12.08 KB, application/xml)
2015-03-26 08:30 UTC, Zaki_XL

Note You need to log in before you can comment on or make changes to this bug.
Description Zaki_XL 2015-03-23 01:57:37 UTC
Using the HTTP GET request, Content-length header is lost

When sending a BODY a GET request REST API, there is no Contet-length, problems that can not recognize the end of the request is generated (when testing the erastic-search, it was noticed a problem)

I tried to send a similar GET request with curl command but, content-length header was sent.
Comment 1 Philippe Mouawad 2015-03-25 21:09:38 UTC
Is it possible to submit a simple jmeter test showing issue ?
Or set in user.Properties this:

Launch the test  and show the expected request/response and what you get instead ?
Plus the used test plan.
Comment 2 Philippe Mouawad 2015-03-25 21:11:40 UTC
Note that JMeter does not allow override of Content-Length in Headers as it is computed by HttpClient
Is this the issue your are facing ?
Comment 3 Zaki_XL 2015-03-26 08:30:23 UTC
Created attachment 32610 [details]

Erasticsearch percolator TEST
Comment 4 Zaki_XL 2015-03-26 08:48:50 UTC

I have wanted to throw the following request to the server.
I shows an example in the curl command.

curl -XGET \
https://www.test-erasticsearch.com/filter/message/_percolate?pretty \
-d '{
  "highlight": {
    "fields": {
      "message": {
        "pre_tags": ["("],
        "post_tags": [")"]
  "size": 20,
  "doc": {
    "message": "HOGE FUGA XXXX"
request header in the curl command (a little modification)
> GET /filter/message/_percolate?pretty HTTP/1.1
> User-Agent: curl/7.30.0
> Host: www.test-erasticsearch.com
> Accept: */*
> Content-Length: 314
> Content-Type: application/x-www-form-urlencoded
* upload completely sent off: 314 out of 314 bytes
Comment 5 Philippe Mouawad 2015-03-26 12:49:07 UTC
When using Body Data with GET method, body is not sent nor Content-Length computed.

To do so, you need to use Parameters tab as you did it in the disabled HTTP Request.
Comment 6 Zaki_XL 2015-03-27 02:49:36 UTC
Thank you for answer
I decided to accept the constraints

Will the reason for this is to erase the content-length when the GET method?
Future I'm think the more hope "want to test the REST API"
Comment 7 Philippe Mouawad 2017-02-26 20:15:19 UTC

*** This bug has been marked as a duplicate of bug 60358 ***