| | @@ -1366,10 +1366,29 @@ |
| 1366 | 1366 | }else{ |
| 1367 | 1367 | Th_SetResult(interp, "repository unavailable", -1); |
| 1368 | 1368 | return TH_ERROR; |
| 1369 | 1369 | } |
| 1370 | 1370 | } |
| 1371 | + |
| 1372 | +/* |
| 1373 | +** TH1 command: cgiHeaderLine line |
| 1374 | +** |
| 1375 | +** Adds the specified line to the CGI header. |
| 1376 | +*/ |
| 1377 | +static int cgiHeaderLineCmd( |
| 1378 | + Th_Interp *interp, |
| 1379 | + void *p, |
| 1380 | + int argc, |
| 1381 | + const char **argv, |
| 1382 | + int *argl |
| 1383 | +){ |
| 1384 | + if( argc!=2 ){ |
| 1385 | + return Th_WrongNumArgs(interp, "cgiHeaderLine line"); |
| 1386 | + } |
| 1387 | + cgi_append_header(argv[1]); |
| 1388 | + return TH_OK; |
| 1389 | +} |
| 1371 | 1390 | |
| 1372 | 1391 | /* |
| 1373 | 1392 | ** TH1 command: unversioned content FILENAME |
| 1374 | 1393 | ** |
| 1375 | 1394 | ** Attempts to locate the specified unversioned file and return its contents. |
| | @@ -1982,10 +2001,11 @@ |
| 1982 | 2001 | void *pContext; |
| 1983 | 2002 | } aCommand[] = { |
| 1984 | 2003 | {"anoncap", hascapCmd, (void*)&anonFlag}, |
| 1985 | 2004 | {"anycap", anycapCmd, 0}, |
| 1986 | 2005 | {"artifact", artifactCmd, 0}, |
| 2006 | + {"cgiHeaderLine", cgiHeaderLineCmd, 0}, |
| 1987 | 2007 | {"checkout", checkoutCmd, 0}, |
| 1988 | 2008 | {"combobox", comboboxCmd, 0}, |
| 1989 | 2009 | {"date", dateCmd, 0}, |
| 1990 | 2010 | {"decorate", wikiCmd, (void*)&aFlags[2]}, |
| 1991 | 2011 | {"dir", dirCmd, 0}, |
| 1992 | 2012 | |