Fossil SCM
Make the new multi-repository fossil server feature work with the "clone" command.
Commit
a918bdf56b3dc707b450d3e4fa42814e017ec3ba
Parent
a61fe7b87876b06…
2 files changed
-8
+7
-8
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -700,20 +700,12 @@ | ||
| 700 | 700 | process_multipart_form_data(z, len); |
| 701 | 701 | } |
| 702 | 702 | }else if( strcmp(zType, "application/x-fossil")==0 ){ |
| 703 | 703 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 704 | 704 | blob_uncompress(&g.cgiIn, &g.cgiIn); |
| 705 | - /* If the content type is application/x-fossil, then ignore | |
| 706 | - ** the path in the first line of the HTTP header and always | |
| 707 | - ** use the /xfer method since the /xfer method is the only | |
| 708 | - ** method that understands the application/x-fossil content | |
| 709 | - ** type. | |
| 710 | - */ | |
| 711 | - cgi_replace_parameter("PATH_INFO", "/xfer"); | |
| 712 | 705 | }else if( strcmp(zType, "application/x-fossil-debug")==0 ){ |
| 713 | 706 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 714 | - cgi_replace_parameter("PATH_INFO", "/xfer"); /* See comment above */ | |
| 715 | 707 | } |
| 716 | 708 | } |
| 717 | 709 | |
| 718 | 710 | z = (char*)P("HTTP_COOKIE"); |
| 719 | 711 | if( z ){ |
| 720 | 712 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -700,20 +700,12 @@ | |
| 700 | process_multipart_form_data(z, len); |
| 701 | } |
| 702 | }else if( strcmp(zType, "application/x-fossil")==0 ){ |
| 703 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 704 | blob_uncompress(&g.cgiIn, &g.cgiIn); |
| 705 | /* If the content type is application/x-fossil, then ignore |
| 706 | ** the path in the first line of the HTTP header and always |
| 707 | ** use the /xfer method since the /xfer method is the only |
| 708 | ** method that understands the application/x-fossil content |
| 709 | ** type. |
| 710 | */ |
| 711 | cgi_replace_parameter("PATH_INFO", "/xfer"); |
| 712 | }else if( strcmp(zType, "application/x-fossil-debug")==0 ){ |
| 713 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 714 | cgi_replace_parameter("PATH_INFO", "/xfer"); /* See comment above */ |
| 715 | } |
| 716 | } |
| 717 | |
| 718 | z = (char*)P("HTTP_COOKIE"); |
| 719 | if( z ){ |
| 720 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -700,20 +700,12 @@ | |
| 700 | process_multipart_form_data(z, len); |
| 701 | } |
| 702 | }else if( strcmp(zType, "application/x-fossil")==0 ){ |
| 703 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 704 | blob_uncompress(&g.cgiIn, &g.cgiIn); |
| 705 | }else if( strcmp(zType, "application/x-fossil-debug")==0 ){ |
| 706 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | z = (char*)P("HTTP_COOKIE"); |
| 711 | if( z ){ |
| 712 |
+7
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -618,10 +618,17 @@ | ||
| 618 | 618 | zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo); |
| 619 | 619 | cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]); |
| 620 | 620 | zPathInfo += i; |
| 621 | 621 | cgi_replace_parameter("SCRIPT_NAME", zNewScript); |
| 622 | 622 | db_open_repository(zRepo); |
| 623 | + if( g.fHttpTrace ){ | |
| 624 | + fprintf(stderr, | |
| 625 | + "# repository: [%s]\n" | |
| 626 | + "# new PATH_INFO = [%s]\n" | |
| 627 | + "# new SCRIPT_NAME = [%s]\n", | |
| 628 | + zRepo, zPathInfo, zNewScript); | |
| 629 | + } | |
| 623 | 630 | } |
| 624 | 631 | |
| 625 | 632 | /* Find the page that the user has requested, construct and deliver that |
| 626 | 633 | ** page. |
| 627 | 634 | */ |
| 628 | 635 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -618,10 +618,17 @@ | |
| 618 | zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo); |
| 619 | cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]); |
| 620 | zPathInfo += i; |
| 621 | cgi_replace_parameter("SCRIPT_NAME", zNewScript); |
| 622 | db_open_repository(zRepo); |
| 623 | } |
| 624 | |
| 625 | /* Find the page that the user has requested, construct and deliver that |
| 626 | ** page. |
| 627 | */ |
| 628 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -618,10 +618,17 @@ | |
| 618 | zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo); |
| 619 | cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]); |
| 620 | zPathInfo += i; |
| 621 | cgi_replace_parameter("SCRIPT_NAME", zNewScript); |
| 622 | db_open_repository(zRepo); |
| 623 | if( g.fHttpTrace ){ |
| 624 | fprintf(stderr, |
| 625 | "# repository: [%s]\n" |
| 626 | "# new PATH_INFO = [%s]\n" |
| 627 | "# new SCRIPT_NAME = [%s]\n", |
| 628 | zRepo, zPathInfo, zNewScript); |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | /* Find the page that the user has requested, construct and deliver that |
| 633 | ** page. |
| 634 | */ |
| 635 |