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

Remove 308 redirect support from App/AppUser #7942

Open
sync-by-unito bot opened this issue Aug 1, 2024 · 3 comments · Fixed by #7994 or #7996
Open

Remove 308 redirect support from App/AppUser #7942

sync-by-unito bot opened this issue Aug 1, 2024 · 3 comments · Fixed by #7994 or #7996
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Aug 1, 2024

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.

Copy link
Author

sync-by-unito bot commented Aug 1, 2024

➤ PM Bot commented:

Jira ticket: RCORE-2222

Copy link
Author

sync-by-unito bot commented Aug 12, 2024

➤ 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.

Copy link
Author

sync-by-unito bot commented Aug 19, 2024

➤ michael-wb commented:

The redirect support will be removed and the following items will be retained:

  • Redirect response (4003) from server upon websocket connect
  • Request location on app startup
  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant