Fossil

Check-in [1ce716b2ec]
Login

Check-in [1ce716b2ec]

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

Overview
Comment:Add the g.zExtra output to the test_env page. Fix a bug in the computation of g.zTop.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1ce716b2ecf72a18fdeef0f7460193180970203b
User & Date: drh 2007-10-11 02:11:42.000
Context
2007-10-12
22:56
The g.zExtra parameter is now always available as P("name"). This means the /wiki/xyz and /wiki?name=xyz are equivalent URLs. ... (check-in: 677aa71bca user: drh tags: trunk)
2007-10-11
02:11
Add the g.zExtra output to the test_env page. Fix a bug in the computation of g.zTop. ... (check-in: 1ce716b2ec user: drh tags: trunk)
01:56
Add the g.zBaseURL and g.zTop printouts to the test_env test page. ... (check-in: 218577e3af user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
    while( i>0 && zCur[i-1]=='/' ){ i--; }
  }
  while( i>0 && zCur[i-1]!='/' ){ i--; }
  while( i>0 && zCur[i-1]=='/' ){ i--; }

  if( strcmp(zMode,"on")==0 ){
    g.zBaseURL = mprintf("https://%s%.*s", zHost, i, zCur);
    g.zTop = &g.zBaseURL[8+strlen(zHost)+i];
  }else{
    g.zBaseURL = mprintf("http://%s%.*s", zHost, i, zCur);
    g.zTop = &g.zBaseURL[7+strlen(zHost)+i];
  }
}

/*
** Preconditions:
**
**    * Environment various are set up according to the CGI standard.







|


|







436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
    while( i>0 && zCur[i-1]=='/' ){ i--; }
  }
  while( i>0 && zCur[i-1]!='/' ){ i--; }
  while( i>0 && zCur[i-1]=='/' ){ i--; }

  if( strcmp(zMode,"on")==0 ){
    g.zBaseURL = mprintf("https://%s%.*s", zHost, i, zCur);
    g.zTop = &g.zBaseURL[8+strlen(zHost)];
  }else{
    g.zBaseURL = mprintf("http://%s%.*s", zHost, i, zCur);
    g.zTop = &g.zBaseURL[7+strlen(zHost)];
  }
}

/*
** Preconditions:
**
**    * Environment various are set up according to the CGI standard.
Changes to src/style.c.
236
237
238
239
240
241
242
243

244
245
246

/*
** WEBPAGE: test_env
*/
void page_test_env(void){
  style_header("Environment Test");
  @ g.zBaseURL = %h(g.zBaseURL)<br>
  @ g.zTop = %h(g.zTop)<hr>

  cgi_print_all();
  style_footer();
}







|
>



236
237
238
239
240
241
242
243
244
245
246
247

/*
** WEBPAGE: test_env
*/
void page_test_env(void){
  style_header("Environment Test");
  @ g.zBaseURL = %h(g.zBaseURL)<br>
  @ g.zTop = %h(g.zTop)<br>
  @ g.zExtra = %h(g.zExtra)<hr>
  cgi_print_all();
  style_footer();
}