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

client: don't print a (confusing) warning if we're using an https:// URL #5074

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions client/cs_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,9 @@ int CLIENT_STATE::handle_scheduler_reply(

// compare our URL for this project with the one returned in the reply
// (which comes from the project's config.xml).
// - if http -> https transition, make the change
// - if http -> https transition, use the https: one from now on
// - if https -> http transition, keep using the https: one
// - otherwise notify the user.
// This means that if a project changes its master URL,
// its users have to detach/reattach.
//
if (strlen(sr.master_url)) {
canonicalize_master_url(sr.master_url, sizeof(sr.master_url));
Expand All @@ -612,6 +611,9 @@ int CLIENT_STATE::handle_scheduler_reply(
msg_printf(project, MSG_INFO,
"Project URL changed from http:// to https://"
);
} else if (is_https_transition(reply_url.c_str(), current_url.c_str())) {
// project is advertising http://, but https:// works.
// keep using https://
} else {
msg_printf(project, MSG_USER_ALERT,
_("This project seems to have changed its URL. When convenient, remove the project, then add %s"),
Expand Down