bombardier icon indicating copy to clipboard operation
bombardier copied to clipboard

Getting error as "HostClient can't follow redirects to a different protocol, please use Client instead - 6111380"

Open kranthikumar-kvs-by opened this issue 3 years ago • 5 comments

Getting error as "HostClient can't follow redirects to a different protocol, please use Client instead - 6111380", is there any settings we can set that ignores the redirect URLs.

kranthikumar-kvs-by avatar May 11 '21 06:05 kranthikumar-kvs-by

I get the same issue. Something is wrong with fasthttp for tls connections it seems.

calbot avatar May 14 '21 22:05 calbot

I am getting the same error as well. I see the same problem on Mac OS and Linux.

darlanmoraes avatar Aug 19 '21 17:08 darlanmoraes

I see the same error when using https scheme. adding --http2 flag in the command seems to address the problem

cfauchere avatar Oct 06 '21 13:10 cfauchere

Nice catch @cfauchere , thanks for sharing the workaround!

I wonder if it's by design that --fasthttp does not support HTTPS? Or is it a bug in this lib?

bocharsky-bw avatar Mar 06 '22 06:03 bocharsky-bw

Thanks for the report and all of your inputs.

Looks like there was a backwards incompatible change in fasthttp.HostClient's behaviour (see valyala/fasthttp#800). That said, I'm not sure if fasthttp.Client handles this case any better.

@bocharsky-bw:

I wonder if it's by design that --fasthttp does not support HTTPS?

Both fasthttp and bombardier (with --fasthttp which is default) support HTTPS. A caveat here is that bombardier DOES NOT follow redirects, feel free to file a feature request or contribute this feature via a pull request, if this is something you'd like bombardier to be able to do.

@kranthikumar-kvs-by:

Getting error as "HostClient can't follow redirects to a different protocol, please use Client instead - 6111380", is there any settings we can set that ignores the redirect URLs.

A bit more context here would be very welcome. I.e. full command used and its output, what kind of server was used, etc.. Ideally, a minimal reproducible example.

My best guess given all the feedback provided is that this happens when one tries to send HTTPS requests to a server that only supports HTTP and tries to change the protocol used, but might be wrong.

codesenberg avatar Apr 27 '23 11:04 codesenberg