MCPcopy Index your code
hub / github.com/git/git / get_curl_http_version_opt

Function get_curl_http_version_opt

http.c:1097–1117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1095}
1096
1097static int get_curl_http_version_opt(const char *version_string, long *opt)
1098{
1099 int i;
1100 static struct {
1101 const char *name;
1102 long opt_token;
1103 } choice[] = {
1104 { "HTTP/1.1", CURL_HTTP_VERSION_1_1 },
1105 { "HTTP/2", CURL_HTTP_VERSION_2 }
1106 };
1107
1108 for (i = 0; i < ARRAY_SIZE(choice); i++) {
1109 if (!strcmp(version_string, choice[i].name)) {
1110 *opt = choice[i].opt_token;
1111 return 0;
1112 }
1113 }
1114
1115 warning("unknown value given to http.version: '%s'", version_string);
1116 return -1; /* not found */
1117}
1118
1119static CURL *get_curl_handle(void)
1120{

Callers 1

get_curl_handleFunction · 0.85

Calls 1

warningFunction · 0.85

Tested by

no test coverage detected