Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to specify query string in url with apache bench

My rails application is running on thin server which i want to benchmark using apachebench

the command am using is

ab -n 1 -c 1 http://localhost:3001/welcome/search?query="doctor"&rad=5

But thin server is not taking this url.Its giving

!! Invalid Request

Can any one help me how to give the url such that thin accepts the url with query string

like image 620
kshama Avatar asked May 09 '10 12:05

kshama


1 Answers

apache benchmark wont resolve "localhost" out of the url. change it to 0.0.0.0 or 127.0.0.1 and quote the whole url to avoid problems with the ampersand. eg:

ab -n 1 -c 1 "http://0.0.0.0:3001/welcome/search?query=doctor&rad=5"
like image 184
Steven Soroka Avatar answered Sep 28 '22 07:09

Steven Soroka