commit cb557a498be9d6e289166a677b1af701d8a2d36d from: Stefan Sperling date: Thu Apr 18 15:19:53 2024 UTC set a default port for http notifications if not specified in gotd.conf ok op@ commit - 55286da2a584fd52fba19447ba11921f6c3eff17 commit + cb557a498be9d6e289166a677b1af701d8a2d36d blob - 0aa454a1c57aed05f6c61df19f663823fe60f40b blob + 5c541845a38938fd010b806b6893f3b106de2d28 --- gotd/parse.y +++ gotd/parse.y @@ -1573,6 +1573,18 @@ conf_notify_http(struct gotd_repo *repo, char *url, ch "repository '%s", proto, url, repo->name); ret = -1; goto done; + } + + if (port == NULL) { + if (strcmp(proto, "http") == 0) + port = strdup("80"); + if (strcmp(proto, "https") == 0) + port = strdup("443"); + if (port == NULL) { + error = got_error_from_errno("strdup"); + ret = -1; + goto done; + } } if ((user != NULL && password == NULL) ||