Commit Diff


commit - 2ae445d7109c3e4848ed317abe83fd9925c3d9b0
commit + b290a4cca440a1deb97931a806942fdaa1724892
blob - cb263e7982ff1b62a77e424c928ae24f0e39fc8c
blob + e7d8e3c316b024edf031e3c53176113960270d1d
--- 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) ||