Fossil

Check-in [c3a17f81]
Login

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

Overview
Comment:Comment fix.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | httpsBaseUrl
Files: files | file ages | folders
SHA1:c3a17f81cff300eddc2eaed7dbe26d840c9d6c3a
User & Date: mistachkin 2016-02-01 04:11:51
Context
2016-02-01
20:22
Use strncmp() instead of memcmp(). Closed-Leaf check-in: ffd5e09e user: mistachkin tags: httpsBaseUrl
04:38
Test of latest feature branches, do not merge. Closed-Leaf check-in: 1a164e5f user: mistachkin tags: do-not-merge, feature-test
04:11
Comment fix. check-in: c3a17f81 user: mistachkin tags: httpsBaseUrl
04:11
The 'g.zHttpsURL' variable should be populated even when the --baseurl option is used. check-in: c45195f1 user: mistachkin tags: httpsBaseUrl
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
  const char *zCur;

  if( g.zBaseURL!=0 ) return;
  if( zAltBase ){
    int i, n, c;
    g.zTop = g.zBaseURL = mprintf("%s", zAltBase);
    if( memcmp(g.zTop, "http://", 7)==0 ){
      /* its HTTP, replace prefix with HTTPS. */
      g.zHttpsURL = mprintf("https://%s", &g.zTop[7]);
    }else if( memcmp(g.zTop,"https://",8)==0 ){
      /* its already HTTPS, use it. */
      g.zHttpsURL = mprintf("%s", g.zTop);
    }else{
      fossil_fatal("argument to --baseurl should be 'http://host/path'"
                   " or 'https://host/path'");
    }
    for(i=n=0; (c = g.zTop[i])!=0; i++){
      if( c=='/' ){







|


|







1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
  const char *zCur;

  if( g.zBaseURL!=0 ) return;
  if( zAltBase ){
    int i, n, c;
    g.zTop = g.zBaseURL = mprintf("%s", zAltBase);
    if( memcmp(g.zTop, "http://", 7)==0 ){
      /* it is HTTP, replace prefix with HTTPS. */
      g.zHttpsURL = mprintf("https://%s", &g.zTop[7]);
    }else if( memcmp(g.zTop,"https://",8)==0 ){
      /* it is already HTTPS, use it. */
      g.zHttpsURL = mprintf("%s", g.zTop);
    }else{
      fossil_fatal("argument to --baseurl should be 'http://host/path'"
                   " or 'https://host/path'");
    }
    for(i=n=0; (c = g.zTop[i])!=0; i++){
      if( c=='/' ){