0

I am using h2load (nghttp2) to test a PHP served server. The request type should be POST.

I use the following command, but get the error in server:

h2load http://192.168.10.190:8009/echoservice/ping \
  -d post_data \
  -H 'content-type: application/x-www-form-urlencoded' \
  -t 12 -c 400 -n1000

Invalid request (Malformed HTTP request)

The file post_data contains string:

msg=FromClient

What is the problem with this command?

UPDATE 1:

When I use h2load for GET requests, I get Invalid request (Malformed HTTP request) too! wrk tests are successful. Hence, no problem with server!

In case of gRPC, h2load tests were successful.

1 Answers1

0

Use -H, --header=<HEADER> option and set :method as POST.

-H: ':method: POST'
Soumya Kanti
  • 1,429
  • 1
  • 17
  • 28