Fossil SCM

Make the new multi-repository fossil server feature work with the "clone" command.

drh 2010-02-01 15:07 trunk
Commit a918bdf56b3dc707b450d3e4fa42814e017ec3ba
2 files changed -8 +7
-8
--- src/cgi.c
+++ src/cgi.c
@@ -700,20 +700,12 @@
700700
process_multipart_form_data(z, len);
701701
}
702702
}else if( strcmp(zType, "application/x-fossil")==0 ){
703703
blob_read_from_channel(&g.cgiIn, g.httpIn, len);
704704
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");
712705
}else if( strcmp(zType, "application/x-fossil-debug")==0 ){
713706
blob_read_from_channel(&g.cgiIn, g.httpIn, len);
714
- cgi_replace_parameter("PATH_INFO", "/xfer"); /* See comment above */
715707
}
716708
}
717709
718710
z = (char*)P("HTTP_COOKIE");
719711
if( z ){
720712
--- 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 @@
618618
zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo);
619619
cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]);
620620
zPathInfo += i;
621621
cgi_replace_parameter("SCRIPT_NAME", zNewScript);
622622
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
+ }
623630
}
624631
625632
/* Find the page that the user has requested, construct and deliver that
626633
** page.
627634
*/
628635
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button