Open jaroslavtyc opened 1 year ago
This reminds me of https://github.com/ruflin/Elastica/issues/1777 Can you check where we landed there? Need to read up on it again.
@ruflin In that issue I have found opposite problems
My proposal is to make sure there is slash if and only if there will be path appended to host. It can be redundant if you solve somehow the https://github.com/ruflin/Elastica/issues/1777, but it will solve without any detect-server-and-client-expectations magic single problem now and will be harmless later.
Thanks for the clarification. I couldn't really think of a reason why there would ever be no /
be needed in this situation except the path put in would start with a /
. But then again, users don't put paths in but indexNames
for example where /
is not an allowed character. But now things become interesting: All tests fail so there seems to be a pretty strong side effect of this. Can you take a closer look on what happens?
Please also add a changelog entry.
Accept both with and without trailing slash URL as Elastic source.
I have spent few time to find out what is wrong with Elastic URL
https://foo:bar@elastic-dev.example.com
, getting errorCouldn't resolve host
Reason was missing trailing slash in URL, leading into invalid URL
https://foo:bar@elastic-dev.example.combitbag_shop_product
instead of correcthttps://foo:bar@elastic-dev.example.com/bitbag_shop_product
Suggested change ensures slash between base URL and request path (Elastic index name in this case).