Open sync-by-unito[bot] opened 3 months ago
➤ PM Bot commented:
Jira ticket: RCORE-2222
➤ michael-wb commented:
The CPP SDK should probably add redirect support before releasing this set of changes. They are using the http client from Realm Core networking, so it could potentially be added to the callback handler that receives the http response.
➤ michael-wb commented:
The redirect support will be removed and the following items will be retained:
set_base_url()
will cache the new base_url and send a request a request to the server to update the location before the next connection request - this is not cached between restarts of app, since the current value of App::Config::base_url
will be used on startup unless it is not set, which will use the default value.get_base_url()
will return the last configured base url value
We have a bunch of code that tries to handle 308 HTTP redirects received from BAAS, but it turns out that all-but-one of the implementations of the GenericNetworkTransport follow 308-redirects transparently and the server doesn't actually send any 308 redirects, so our handling of 308 redirects is actually dead code in production. We should remove all the redirect handling code and any associated tests to simplify the codebase.