Fossil

Check-in [1b883d49]
Login

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

Overview
Comment:fix [e49f245975f89a8a9c006ec224eed48c8ad77593] by adding -nocgi option
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1b883d49cf0885c74f1324b545caf28aafec385a
User & Date: ron 2010-11-09 08:59:34
References
2010-11-09
09:01 Ticket [e49f2459] Add '-nocgi' option status still Fixed with 2 other changes artifact: 83a941cc user: ron
Context
2010-11-09
10:44
For cloning and syncing, give all users the privileges of both "nobody" and "anonymous" without requiring a login message. Ticket [1318677c15af04480b]. check-in: 134f5b37 user: drh tags: trunk
08:59
fix [e49f245975f89a8a9c006ec224eed48c8ad77593] by adding -nocgi option check-in: 1b883d49 user: ron tags: trunk
2010-11-08
20:01
Fix a bug in the manifest parser which caused it to ignore manifests that were signed by a windows-build of PGP. check-in: 696668aa user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
/*
** This procedure runs first.
*/
int main(int argc, char **argv){
  const char *zCmdName = "unknown";
  int idx;
  int rc;
  int mightBeCgi;

  sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
  g.now = time(0);
  g.argc = argc;
  g.argv = argv;
  mightBeCgi = getenv("GATEWAY_INTERFACE")!=0;
  if( argc<2 ){
    if( mightBeCgi ){
      zCmdName = "cgi";
    }else{
      fprintf(stderr, "Usage: %s COMMAND ...\n"
                      "\"%s help\" for a list of available commands\n"
                      "\"%s help COMMAND\" for specific details\n",
                      argv[0], argv[0], argv[0]);
      fossil_exit(1);
    }
  }else{
    g.fQuiet = find_option("quiet", 0, 0)!=0;
    g.fSqlTrace = find_option("sqltrace", 0, 0)!=0;
    g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
    g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
    g.zLogin = find_option("user", "U", 1);
    zCmdName = argv[1];
  }
  rc = name_search(zCmdName, aCommand, count(aCommand), &idx);
  if( rc==1 && mightBeCgi ){
    rc = name_search("cgi", aCommand, count(aCommand), &idx);
  }
  if( rc==1 ){
    fprintf(stderr,"%s: unknown command: %s\n"
                   "%s: use \"help\" for more information\n",
                   argv[0], zCmdName, argv[0]);
    fossil_exit(1);
  }else if( rc==2 ){
    fprintf(stderr,"%s: ambiguous command prefix: %s\n"







<





|
<
<
|
|
|
|
|
|
|
<









<
<
<







221
222
223
224
225
226
227

228
229
230
231
232
233


234
235
236
237
238
239
240

241
242
243
244
245
246
247
248
249



250
251
252
253
254
255
256
/*
** This procedure runs first.
*/
int main(int argc, char **argv){
  const char *zCmdName = "unknown";
  int idx;
  int rc;


  sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
  g.now = time(0);
  g.argc = argc;
  g.argv = argv;
  if( getenv("GATEWAY_INTERFACE")!=0 && !find_option("nocgi", 0, 0)){


    zCmdName = "cgi";
  }else if( argc<2 ){
    fprintf(stderr, "Usage: %s COMMAND ...\n"
                    "\"%s help\" for a list of available commands\n"
                    "\"%s help COMMAND\" for specific details\n",
                    argv[0], argv[0], argv[0]);
    fossil_exit(1);

  }else{
    g.fQuiet = find_option("quiet", 0, 0)!=0;
    g.fSqlTrace = find_option("sqltrace", 0, 0)!=0;
    g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
    g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
    g.zLogin = find_option("user", "U", 1);
    zCmdName = argv[1];
  }
  rc = name_search(zCmdName, aCommand, count(aCommand), &idx);



  if( rc==1 ){
    fprintf(stderr,"%s: unknown command: %s\n"
                   "%s: use \"help\" for more information\n",
                   argv[0], zCmdName, argv[0]);
    fossil_exit(1);
  }else if( rc==2 ){
    fprintf(stderr,"%s: ambiguous command prefix: %s\n"