I recently ran into an issue with load testing ruby on rails while attempting to post xml data to a ruby appplication via httperf. Everything seemed correct except I could not get httperf to post this data correctly. The issue ended up being that the httperf switch -add-header requires a \n at the end of your HTTP header to process correctly. The entire command to test against the ruby application is below.
Short Answer: Install httperf, use the –add-header switch, and the wsesslog switch.
This was completed on a server running CentOS
1. Install httperf via yum (can be completed by adding the rpmforge yum repo): yum install httperf
2. Create a file(in this case httperf-test) to provide URI and other data.
File Contents: /testurl method=POST contents=’content data here’
3. Issue command: httperf –server server.example.com –add-header=”Content-Type: text/xml\n” –wsesslog 1,2,httperf-test