Fossil

Check-in [3eb0594c]
Login

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

Overview
Comment:Honor the --baseurl command-line option in scgi mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3eb0594c9eabe321384ea0df2283057046f9077d
User & Date: drh 2015-04-01 17:23:49
Context
2015-04-01
19:16
Made dotfiles a versionable setting. check-in: 5fb84d01 user: sdr tags: trunk
17:23
Honor the --baseurl command-line option in scgi mode. check-in: 3eb0594c user: drh tags: trunk
08:52
Fix interpretation of '+' or '-' as invalid integers. Noted on ML by Sergei Gavrikov. Thanks! check-in: 4ae42e36 user: jan.nijtmans tags: trunk
06:26
Honor --baseurl command line option (as observed by fact that global variables are not null) so relative links work. Closed-Leaf check-in: 7c8eb85c user: andybradford tags: baseurl-fix
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

1520
1521
1522
1523
1524
1525
1526





1527
1528
1529
1530
1531
1532
1533
        }
        szFile = 1;
        break;
      }
      if( szFile==0 ){
        if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; }
        szFile = file_size(zRepo);





      }
      if( szFile<0 && i>0 ){
        const char *zMimetype;
        assert( fossil_strcmp(&zRepo[j], ".fossil")==0 );
        zRepo[j] = 0;
        if( zPathInfo[i]=='/' && file_isdir(zRepo)==1 ){
          fossil_free(zToFree);







>
>
>
>
>







1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
        }
        szFile = 1;
        break;
      }
      if( szFile==0 ){
        if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; }
        szFile = file_size(zRepo);
        /* this should only be set from the --baseurl option, not CGI  */
        if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 ){
          g.zBaseURL = mprintf("%s%.*s", g.zBaseURL, i, zPathInfo);
          g.zTop = mprintf("%s%.*s", g.zTop, i, zPathInfo);
        }
      }
      if( szFile<0 && i>0 ){
        const char *zMimetype;
        assert( fossil_strcmp(&zRepo[j], ".fossil")==0 );
        zRepo[j] = 0;
        if( zPathInfo[i]=='/' && file_isdir(zRepo)==1 ){
          fossil_free(zToFree);