Go to the documentation of this file.
   23 static void test(
const char *base, 
const char *rel)
 
   25     char buf[200], buf2[200];
 
   30         snprintf(buf2, 
sizeof(buf2), 
"%s", base);
 
   32         if (strcmp(buf, buf2)) {
 
   33             printf(
"In-place handling of %s + %s failed\n", base, rel);
 
   42     test(
"/foo/bar", 
"baz");
 
   43     test(
"/foo/bar", 
"../baz");
 
   44     test(
"/foo/bar", 
"/baz");
 
   45     test(
"http://server/foo/", 
"baz");
 
   46     test(
"http://server/foo/bar", 
"baz");
 
   47     test(
"http://server/foo/", 
"../baz");
 
   48     test(
"http://server/foo/bar/123", 
"../../baz");
 
   49     test(
"http://server/foo/bar/123", 
"/baz");
 
   50     test(
"http://server/foo/bar/123", 
"https://other/url");
 
   51     test(
"http://server/foo/bar?param=value/with/slashes", 
"/baz");
 
   52     test(
"http://server/foo/bar?param&otherparam", 
"?someparam");
 
   53     test(
"http://server/foo/bar", 
"//other/url");