| 1071 | } |
| 1072 | |
| 1073 | static long get_curl_allowed_protocols(int from_user, struct strbuf *list) |
| 1074 | { |
| 1075 | long bits = 0; |
| 1076 | |
| 1077 | if (is_transport_allowed("http", from_user)) { |
| 1078 | bits |= CURLPROTO_HTTP; |
| 1079 | proto_list_append(list, "http"); |
| 1080 | } |
| 1081 | if (is_transport_allowed("https", from_user)) { |
| 1082 | bits |= CURLPROTO_HTTPS; |
| 1083 | proto_list_append(list, "https"); |
| 1084 | } |
| 1085 | if (is_transport_allowed("ftp", from_user)) { |
| 1086 | bits |= CURLPROTO_FTP; |
| 1087 | proto_list_append(list, "ftp"); |
| 1088 | } |
| 1089 | if (is_transport_allowed("ftps", from_user)) { |
| 1090 | bits |= CURLPROTO_FTPS; |
| 1091 | proto_list_append(list, "ftps"); |
| 1092 | } |
| 1093 | |
| 1094 | return bits; |
| 1095 | } |
| 1096 | |
| 1097 | static int get_curl_http_version_opt(const char *version_string, long *opt) |
| 1098 | { |
no test coverage detected