1
votes

I wonder about the differences I found regarding HTTP Client implementation,

There's options to choose HTTPClient 4 or Java

But for a simple case (www.google.com) Java implementation always show 0 in connect time and sent bytes Sampler results:

Connect Time: 0
Sent bytes:0 

While HTTPClient 4 return different values each time as:

Connect Time: 100
Sent bytes:117

Request body is the same

GET http://www.google.com/

GET data:


[no cookies]

But Request Header differ while HttpClient sends also Host and User-Agent

Connection: keep-alive
Host: www.google.com
User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_25)

Is there a valid reason for these differences?

EDIT

Just to make it more confusing, when choosing empty implementation (should use default) the connect time is always 0 but Sent bytes is never 0

Connect Time: 0 Sent bytes:117

1

1 Answers

1
votes

Java and HttpClient are 2 different implementations that can be used by HTTP Request.

The java one is less rich than hc4 and for example it does not implement :

  • sent bytes metric computation
  • connection time metric
  • kerberos authentication

There are also other features missing in Java implementation.

When you select empty, the value in property «jmeter.httpsampler »  is used, by default it’s hc4.