Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kranthikumar-kvs-by opened this issue May 11, 2021 · 5 comments
Assignees
Labels

Comments

@kranthikumar-kvs-by
Copy link

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.

@calbot
Copy link

calbot commented May 14, 2021

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

@darlanmoraes
Copy link

darlanmoraes commented Aug 19, 2021

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

@cfauchere
Copy link

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

@bocharsky-bw
Copy link

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?

@codesenberg
Copy link
Owner

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 codesenberg self-assigned this Apr 27, 2023
codesenberg added a commit that referenced this issue Apr 27, 2023
…ent to fasthttp.Client

fasthttp's Client, HostClient behave slightly differently,
but all the tests still pass and requests generated seem to be correct.

cmd/utils/simplebenchserver now has --std-http mode in which it
uses HTTP server provided by standard library's net/http package.

Might help with unexpected behaviour encountered in #75.
codesenberg added a commit that referenced this issue Apr 29, 2023
…ent to fasthttp.Client

fasthttp's Client, HostClient behave slightly differently,
but all the tests still pass and requests generated seem to be correct.

cmd/utils/simplebenchserver now has --std-http mode in which it
uses HTTP server provided by standard library's net/http package.

Might help with unexpected behaviour encountered in #75.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants