Fossil

Check-in [a918bdf5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make the new multi-repository fossil server feature work with the "clone" command.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a918bdf56b3dc707b450d3e4fa42814e017ec3ba
User & Date: drh 2010-02-01 15:07:38
Context
2010-02-03
14:36
Add the --notfound option to the "http" and "server" command. For CGI, add configuration lines "directory:" and "notfound:". check-in: 49cffc01 user: drh tags: trunk
2010-02-01
15:07
Make the new multi-repository fossil server feature work with the "clone" command. check-in: a918bdf5 user: drh tags: trunk
06:45
fix typo check-in: a61fe7b8 user: ron tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/cgi.c.

698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
        add_param_list(z, '&');
      }else{
        process_multipart_form_data(z, len);
      }
    }else if( strcmp(zType, "application/x-fossil")==0 ){
      blob_read_from_channel(&g.cgiIn, g.httpIn, len);
      blob_uncompress(&g.cgiIn, &g.cgiIn);
      /* If the content type is application/x-fossil, then ignore
      ** the path in the first line of the HTTP header and always
      ** use the /xfer method since the /xfer method is the only
      ** method that understands the application/x-fossil content
      ** type.
      */
      cgi_replace_parameter("PATH_INFO", "/xfer");
    }else if( strcmp(zType, "application/x-fossil-debug")==0 ){
      blob_read_from_channel(&g.cgiIn, g.httpIn, len);
      cgi_replace_parameter("PATH_INFO", "/xfer");  /* See comment above */
    }
  }

  z = (char*)P("HTTP_COOKIE");
  if( z ){
    z = mprintf("%s",z);
    add_param_list(z, ';');







<
<
<
<
<
<
<


<







698
699
700
701
702
703
704







705
706

707
708
709
710
711
712
713
        add_param_list(z, '&');
      }else{
        process_multipart_form_data(z, len);
      }
    }else if( strcmp(zType, "application/x-fossil")==0 ){
      blob_read_from_channel(&g.cgiIn, g.httpIn, len);
      blob_uncompress(&g.cgiIn, &g.cgiIn);







    }else if( strcmp(zType, "application/x-fossil-debug")==0 ){
      blob_read_from_channel(&g.cgiIn, g.httpIn, len);

    }
  }

  z = (char*)P("HTTP_COOKIE");
  if( z ){
    z = mprintf("%s",z);
    add_param_list(z, ';');

Changes to src/main.c.

616
617
618
619
620
621
622







623
624
625
626
627
628
629
      return;
    }
    zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo);
    cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]);
    zPathInfo += i;
    cgi_replace_parameter("SCRIPT_NAME", zNewScript);
    db_open_repository(zRepo);







  }

  /* Find the page that the user has requested, construct and deliver that
  ** page.
  */
  set_base_url();
  if( zPathInfo==0 || zPathInfo[0]==0 







>
>
>
>
>
>
>







616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
      return;
    }
    zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo);
    cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]);
    zPathInfo += i;
    cgi_replace_parameter("SCRIPT_NAME", zNewScript);
    db_open_repository(zRepo);
    if( g.fHttpTrace ){
      fprintf(stderr, 
          "# repository: [%s]\n"
          "# new PATH_INFO = [%s]\n"
          "# new SCRIPT_NAME = [%s]\n",
          zRepo, zPathInfo, zNewScript);
    }
  }

  /* Find the page that the user has requested, construct and deliver that
  ** page.
  */
  set_base_url();
  if( zPathInfo==0 || zPathInfo[0]==0