Documentation Source Text

Check-in [ec999fa7cd]
Login

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

Overview
Comment:Minor correction to the new path parser in althttpd.c.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ec999fa7cdf2c340fea5ebc88c51da1cc493530491f2202eb4ffdbf6f0eaeb10
User & Date: drh 2018-02-05 00:38:37
Context
2018-02-05
01:36
Rework the CGI scripts for search so that they use the Wapp framework (https://wapp.tcl.tk). check-in: 16a431615f user: drh tags: trunk
00:38
Minor correction to the new path parser in althttpd.c. check-in: ec999fa7cd user: drh tags: trunk
00:32
The SCRIPT_FILENAME cgi parameter in althttpd is now a full pathname. check-in: f30335da5c user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to misc/althttpd.c.

1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
      i++; j++;
    }
    zLine[j] = 0;
    if( stat(zLine,&statbuf)!=0 ){
      int stillSearching = 1;
      while( stillSearching && i>0 ){
        while( j>0 && zLine[j-1]!='/' ){ j--; }
        strcpy(&zLine[j], "/not-found.html");
        if( stat(zLine,&statbuf)==0 && S_ISREG(statbuf.st_mode)
            && access(zLine,R_OK)==0 ){
          zRealScript = StrDup(&zLine[j0]);
          Redirect(zRealScript, 1, __LINE__); /* LOG: redirect to not-found */
          return;
        }else{
          j--;







|







1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
      i++; j++;
    }
    zLine[j] = 0;
    if( stat(zLine,&statbuf)!=0 ){
      int stillSearching = 1;
      while( stillSearching && i>0 ){
        while( j>0 && zLine[j-1]!='/' ){ j--; }
        strcpy(&zLine[j-1], "/not-found.html");
        if( stat(zLine,&statbuf)==0 && S_ISREG(statbuf.st_mode)
            && access(zLine,R_OK)==0 ){
          zRealScript = StrDup(&zLine[j0]);
          Redirect(zRealScript, 1, __LINE__); /* LOG: redirect to not-found */
          return;
        }else{
          j--;