Documentation Source Text

Check-in [76396bf1df]
Login

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

Overview
Comment:Fix the -auth redirect logic to avoid duplicating part of the URL.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:76396bf1dfa87cf3691807e0ecbb8c8e7f1b72961fdacf85c9ff2dedc6cd9df0
User & Date: drh 2018-06-08 13:41:08
Context
2018-06-20
21:13
Add beginning of documentation for window functions in new file windowfunctions.in. check-in: c1e5cf0cb1 user: dan tags: trunk
2018-06-08
13:41
Fix the -auth redirect logic to avoid duplicating part of the URL. check-in: 76396bf1df user: drh tags: trunk
2018-06-07
18:29
In althttpd.c, add the "anyone" line to the -auth file syntax. This allows inserting an -auth file that reads "http-redirect \n anyone" and which will force HTTP connections to redirect to HTTPS. check-in: 9005943d91 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to misc/althttpd.c.

820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
        NotFound(160);  /* LOG:  http request on https-only page */
        fclose(in);
        return 0;
      }
    }else if( strcmp(zFieldName,"http-redirect")==0 ){
      if( !useHttps ){
        zHttp = "https";
        sprintf(zLine, "%s%s", zScript, zPathInfo);
        Redirect(zLine, 1, 170); /* LOG: -auth redirect */
        fclose(in);
        return 0;
      }
    }else if( strcmp(zFieldName,"anyone")==0 ){
      fclose(in);
      return 1;
    }else{







<
|







820
821
822
823
824
825
826

827
828
829
830
831
832
833
834
        NotFound(160);  /* LOG:  http request on https-only page */
        fclose(in);
        return 0;
      }
    }else if( strcmp(zFieldName,"http-redirect")==0 ){
      if( !useHttps ){
        zHttp = "https";

        Redirect(zScript, 1, 170); /* LOG: -auth redirect */
        fclose(in);
        return 0;
      }
    }else if( strcmp(zFieldName,"anyone")==0 ){
      fclose(in);
      return 1;
    }else{