user1345414
user1345414

Reputation: 3865

How ApacheBench can follow redirection

I use AB(ApacheBench), Version 2.3.

I'm trying to test "http://localhost/myPage" with Basic Authentication.

There isn’t any problem when I use web browser like I.E.

The apache’s log message shows HTTP response code changing 401->301->200.

It saied my http request was finished successfully.

But when I use AB , result is different .

AB saied request was completed but Apache’s log shows status has stopped at 301.

Now,My question is how to get AB follows to redirect 301.

Upvotes: 4

Views: 7305

Answers (2)

user1345414
user1345414

Reputation: 3865

Turns out "localhost/myPage" isn't correct path. I should have instead included a "/" at the end of URL like "localhost/myPage/". Now AB follows redirect 301.

Upvotes: 1

toomasr
toomasr

Reputation: 4781

Based on my research AB doesn't follow redirects. I haven't checked the source code but I did a fair share of testing and googling around. My testing involved running AB tests and checking the access log. I was able to get redirects working with wget.

At one point I gave up on AB and installed siege instead, see http://www.joedog.org/siege-home/ for more details.

Upvotes: 3

Related Questions