MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / main

Function main

libs/qhttpserver/http-parser/contrib/url_parser.c:26–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26int main(int argc, char ** argv) {
27 struct http_parser_url u;
28 int len, connect, result;
29
30 if (argc != 3) {
31 printf("Syntax : %s connect|get url\n", argv[0]);
32 return 1;
33 }
34 len = strlen(argv[2]);
35 connect = strcmp("connect", argv[1]) == 0 ? 1 : 0;
36 printf("Parsing %s, connect %d\n", argv[2], connect);
37
38 result = http_parser_parse_url(argv[2], len, connect, &u);
39 if (result != 0) {
40 printf("Parse error : %d\n", result);
41 return result;
42 }
43 printf("Parse ok, result : \n");
44 dump_url(argv[2], &u);
45 return 0;
46}

Callers

nothing calls this directly

Calls 2

http_parser_parse_urlFunction · 0.85
dump_urlFunction · 0.70

Tested by

no test coverage detected