cvs commit: tcl-rivet/tests get.rvt get.test post.rvt post.test
davidw 02/01/22 12:58:48 Modified:.ChangeLog src TclWeb.h TclWebapache.c testsget.rvt get.test post.rvt post.test Log: * tests/get.test: Added some tests related to [var *]. * tests/post.test: Added some tests related to [var *]. Revision ChangesPath 1.24 +4 -0 tcl-rivet/ChangeLog Index: ChangeLog === RCS file: /home/cvs/tcl-rivet/ChangeLog,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ChangeLog 22 Jan 2002 01:27:56 - 1.23 +++ ChangeLog 22 Jan 2002 20:58:48 - 1.24 @@ -1,5 +1,9 @@ 2002-01-22 David N. Welton [EMAIL PROTECTED] + * tests/get.test: Added some tests related to [var *]. + + * tests/post.test: Added some tests related to [var *]. + * src/rivetList.c (Rivet_LassignArrayObjCmd): Use -1 instead of NULL when doing NewStringObj. 1.5 +2 -1 tcl-rivet/src/TclWeb.h Index: TclWeb.h === RCS file: /home/cvs/tcl-rivet/src/TclWeb.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TclWeb.h 22 Jan 2002 01:27:56 - 1.4 +++ TclWeb.h 22 Jan 2002 20:58:48 - 1.5 @@ -5,7 +5,7 @@ * Common API layer. */ -/* $Id: TclWeb.h,v 1.4 2002/01/22 01:27:56 davidw Exp $ */ +/* $Id: TclWeb.h,v 1.5 2002/01/22 20:58:48 davidw Exp $ */ #define DEFAULT_TIME_FORMAT %A, %d-%b-%Y %H:%M:%S %Z @@ -13,6 +13,7 @@ Tcl_Interp *interp; request_rec *req; ApacheRequest *apachereq; +int headers_printed; } TclWebRequest; /* 1.5 +2 -1 tcl-rivet/src/TclWebapache.c Index: TclWebapache.c === RCS file: /home/cvs/tcl-rivet/src/TclWebapache.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TclWebapache.c22 Jan 2002 01:27:56 - 1.4 +++ TclWebapache.c22 Jan 2002 20:58:48 - 1.5 @@ -7,7 +7,7 @@ * operations. */ -/* $Id: TclWebapache.c,v 1.4 2002/01/22 01:27:56 davidw Exp $ */ +/* $Id: TclWebapache.c,v 1.5 2002/01/22 20:58:48 davidw Exp $ */ #include tcl.h @@ -26,6 +26,7 @@ req-interp = interp; req-req = r; req-apachereq = ApacheRequest_new(r); +req-headers_printed = 0; return TCL_OK; } 1.2 +12 -5 tcl-rivet/tests/get.rvt Index: get.rvt === RCS file: /home/cvs/tcl-rivet/tests/get.rvt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- get.rvt 6 Jan 2002 13:30:54 - 1.1 +++ get.rvt 22 Jan 2002 20:58:48 - 1.2 @@ -1,13 +1,20 @@ ? -if { [ var number ] 0 } { -# get/post variables 1.1 -if { [ var exists foobar ] } { +if { [var number] 0 } { +if { [var exists foobar] } { puts \[var get foobar\] = [var get foobar]\n } -# get/post variables 1.{2,3} -if { [ var exists Más ] } { +if { [var exists xst] } { + puts \[var exists xst\]\[var exists noxst\] = [var exists xst] [var exists noxst]\n +} +if { [var exists Más] } { puts \[var get Más\] = [var get Más]\n +} +if { [var exists lstvar1] } { + puts \[var get lstvar1\] = [var get lstvar1]\n +} +if { [var exists lstvar2] } { + puts \[var list lstvar2\] = [var list lstvar2]\n } } 1.3 +19 -3 tcl-rivet/tests/get.test Index: get.test === RCS file: /home/cvs/tcl-rivet/tests/get.test,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- get.test 6 Jan 2002 13:30:54 - 1.2 +++ get.test 22 Jan 2002 20:58:48 - 1.3 @@ -1,4 +1,4 @@ -# $Id: get.test,v 1.2 2002/01/06 13:30:54 davidw Exp $ +# $Id: get.test,v 1.3 2002/01/22 20:58:48 davidw Exp $ ::tcltest::test getvariables-1.1 {GET variables} { set page [ ::http::geturl ${urlbase}get.rvt?foobar=goober ] @@ -6,16 +6,32 @@ set match } {[var get foobar] = goober} -::tcltest::test getvariables-1.2 {GET variables + I18N} { +::tcltest::test getvariables-1.2 {GET variables - exists} { +set page [ ::http::geturl ${urlbase}get.rvt?xst=1 ] +regexp -line {\[var exists xst\]\[var exists noxst\] = 1 0$} [ ::http::data $page ] match +set match +} {[var exists xst][var exists noxst] = 1 0} + +::tcltest::test getvariables-2.1 {GET variables + I18N} { set page [ ::http::geturl ${urlbase}get.rvt?Más=Tú ] regexp -line {^\[var get Más\] = Tú$} [ ::http::data $page ] match set match } {[var
cvs commit: tcl-rivet/src TclWeb.h TclWebapache.c channel.c mod_rivet.c mod_rivet.h rivetCore.c
davidw 02/01/22 13:37:43 Modified:.ChangeLog src TclWeb.h TclWebapache.c channel.c mod_rivet.c mod_rivet.h rivetCore.c Log: * src/mod_rivet.c, src/channel.c, src/rivetCore.c: Switched to TclWeb functions for error, headers. * src/mod_rivet.h: Moved headers_set and headers_printed out of the rivet_server_conf struct and into the TclWebRequest struct. * src/TclWebapache.c: Moved PrintHeaders, PrintError and SetHeaderType from mod_rivet.c. * src/TclWeb.h: Added ER1, ER2 and DEFAULT_HEADER_TYPE here. Revision ChangesPath 1.25 +11 -0 tcl-rivet/ChangeLog Index: ChangeLog === RCS file: /home/cvs/tcl-rivet/ChangeLog,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- ChangeLog 22 Jan 2002 20:58:48 - 1.24 +++ ChangeLog 22 Jan 2002 21:37:42 - 1.25 @@ -1,5 +1,16 @@ 2002-01-22 David N. Welton [EMAIL PROTECTED] + * src/mod_rivet.c, src/channel.c, src/rivetCore.c: Switched to + TclWeb functions for error, headers. + + * src/mod_rivet.h: Moved headers_set and headers_printed out of + the rivet_server_conf struct and into the TclWebRequest struct. + + * src/TclWebapache.c: Moved PrintHeaders, PrintError and + SetHeaderType from mod_rivet.c. + + * src/TclWeb.h: Added ER1, ER2 and DEFAULT_HEADER_TYPE here. + * tests/get.test: Added some tests related to [var *]. * tests/post.test: Added some tests related to [var *]. 1.6 +13 -2 tcl-rivet/src/TclWeb.h Index: TclWeb.h === RCS file: /home/cvs/tcl-rivet/src/TclWeb.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TclWeb.h 22 Jan 2002 20:58:48 - 1.5 +++ TclWeb.h 22 Jan 2002 21:37:42 - 1.6 @@ -5,15 +5,21 @@ * Common API layer. */ -/* $Id: TclWeb.h,v 1.5 2002/01/22 20:58:48 davidw Exp $ */ +/* $Id: TclWeb.h,v 1.6 2002/01/22 21:37:42 davidw Exp $ */ +/* Error wrappers */ +#define ER1 hrpcodepre\n +#define ER2 /pre/codehr\n + +#define DEFAULT_HEADER_TYPE text/html #define DEFAULT_TIME_FORMAT %A, %d-%b-%Y %H:%M:%S %Z typedef struct TclWebRequest { Tcl_Interp *interp; request_rec *req; ApacheRequest *apachereq; -int headers_printed; +int headers_printed; /* has the header been printed yet? */ +int headers_set; /* has the header been set yet? */ } TclWebRequest; /* @@ -42,6 +48,11 @@ int TclWeb_SendHeaders(TclWebRequest *req); +int TclWeb_SetHeaderType(char *header, TclWebRequest *req); + +int TclWeb_PrintHeaders(TclWebRequest *req); + +int TclWeb_PrintError(char *errstr, int htmlflag, TclWebRequest *req); /* *- 1.6 +55 -1 tcl-rivet/src/TclWebapache.c Index: TclWebapache.c === RCS file: /home/cvs/tcl-rivet/src/TclWebapache.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TclWebapache.c22 Jan 2002 20:58:48 - 1.5 +++ TclWebapache.c22 Jan 2002 21:37:42 - 1.6 @@ -7,7 +7,7 @@ * operations. */ -/* $Id: TclWebapache.c,v 1.5 2002/01/22 20:58:48 davidw Exp $ */ +/* $Id: TclWebapache.c,v 1.6 2002/01/22 21:37:42 davidw Exp $ */ #include tcl.h @@ -27,6 +27,7 @@ req-req = r; req-apachereq = ApacheRequest_new(r); req-headers_printed = 0; +req-headers_set = 0; return TCL_OK; } @@ -34,6 +35,59 @@ TclWeb_SendHeaders(TclWebRequest *req) { ap_send_http_header(req-req); +return TCL_OK; +} + +/* Set up the content type header */ + +int +TclWeb_SetHeaderType(char *header, TclWebRequest *req) +{ +if(req-headers_set) + return 0; + +req-req-content_type = header; +req-headers_set = 1; +return TCL_OK; +} + +/* Printer headers if they haven't been printed yet */ +int +TclWeb_PrintHeaders(TclWebRequest *req) +{ +if (req-headers_printed) + return TCL_ERROR; + +if (req-headers_set == 0) + TclWeb_SetHeaderType(DEFAULT_HEADER_TYPE, req); + +ap_send_http_header(req-req); +req-headers_printed = 1; +return TCL_OK; +} + +/* Print nice HTML formatted errors */ +int +TclWeb_PrintError(char *errstr, int htmlflag, TclWebRequest *req) +{ +TclWeb_SetHeaderType(DEFAULT_HEADER_TYPE, req); +TclWeb_PrintHeaders(req); + +if (htmlflag != 1) + ap_rputs(ER1, req-req); + +if (errstr != NULL) +{ + if (htmlflag != 1) + { + ap_rputs
cvs commit: tcl-rivet/src TclWeb.h TclWebapache.c TclWebcgi.c make.tcl
davidw 02/01/19 08:11:52 Modified:.ChangeLog src TclWeb.h TclWebapache.c TclWebcgi.c make.tcl Log: * src/TclWebapache.c: Added individual functions for CGI variable access. Much simpler than trying to devise a data structure to pass them around with. Revision ChangesPath 1.21 +4 -0 tcl-rivet/ChangeLog Index: ChangeLog === RCS file: /home/cvs/tcl-rivet/ChangeLog,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ChangeLog 19 Jan 2002 12:39:12 - 1.20 +++ ChangeLog 19 Jan 2002 16:11:52 - 1.21 @@ -1,5 +1,9 @@ 2002-01-19 David N. Welton [EMAIL PROTECTED] + * src/TclWebapache.c: Added individual functions for CGI variable + access. Much simpler than trying to devise a data structure to + pass them around with. + * src/rivetCore.c (Rivet_LoadEnv): Roll back authorization information command. 1.3 +2 -10 tcl-rivet/src/TclWeb.h Index: TclWeb.h === RCS file: /home/cvs/tcl-rivet/src/TclWeb.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TclWeb.h 18 Jan 2002 20:07:18 - 1.2 +++ TclWeb.h 19 Jan 2002 16:11:52 - 1.3 @@ -3,7 +3,6 @@ * Common API layer. */ - /* *- * @@ -64,23 +63,16 @@ *- */ -int TclWeb_Cookie(Tcl_Obj *list, TclWebRequest *req); - -int TclWeb_GetCookie(Tcl_Obj *list, TclWebRequest *req); -int TclWeb_GetCGIVars(Tcl_Obj *list, TclWebRequest *req); +int TclWeb_GetCookieVars(Tcl_Obj *cookievar, TclWebRequest *req); -int TclWeb_GetEnvVars(Tcl_HashTable *envs, TclWebRequest *req); +int TclWeb_GetEnvVars(Tcl_Obj *envs, TclWebRequest *req); /* upload stuff goes here */ int TclWeb_Escape(char *out, char *in, int len, void *var); int TclWeb_UnEscape(char *out, char *in, int len, void *var); - -int TclWeb_Base64Encode(char *out, char *in, int len, TclWebRequest *req); - -int TclWeb_Base64Decode(char *out, char *in, int len, TclWebRequest *req); int TclWeb_EscapeShellCommand(char *out, char *in, TclWebRequest *req); 1.3 +228 -75 tcl-rivet/src/TclWebapache.c Index: TclWebapache.c === RCS file: /home/cvs/tcl-rivet/src/TclWebapache.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TclWebapache.c18 Jan 2002 20:07:18 - 1.2 +++ TclWebapache.c19 Jan 2002 16:11:52 - 1.3 @@ -7,30 +7,37 @@ * operations. */ -/* $Id: TclWebapache.c,v 1.2 2002/01/18 20:07:18 davidw Exp $ */ +/* $Id: TclWebapache.c,v 1.3 2002/01/19 16:11:52 davidw Exp $ */ #include tcl.h -#include TclWeb.h -typedef struct _TclWebRequest { +#include apache_request.h +#include apache_cookie.h +#include mod_rivet.h + +#define TCLWEBPOOL req-req-pool + +typedef struct TclWebRequest { Tcl_Interp *interp; request_rec *req; ApacheRequest *apachereq; } TclWebRequest; +#include TclWeb.h + int TclWeb_InitRequest(TclWebRequest *req, void *arg) { -req = Tcl_Alloc(sizeof(TclWebRequest)); +req = (TclWebRequest *)Tcl_Alloc(sizeof(TclWebRequest)); req-req = (request_rec *)arg; -req-apacherequest = ApacheRequest_new(r); +req-apachereq = ApacheRequest_new(req-req); return TCL_OK; } int TclWeb_SendHeaders(TclWebRequest *req) { -ap_send_header(req-req); +ap_send_http_header(req-req); return TCL_OK; } @@ -48,22 +55,186 @@ return TCL_OK; } + +int +TclWeb_GetVar(Tcl_Obj *result, char *varname, TclWebRequest *req) +{ +int i; +array_header *parmsarray = ap_table_elts(req-apachereq-parms); +table_entry *parms = (table_entry *)parmsarray-elts; + +result = NULL; + +/* This isn't real efficient - move to hash table later + on... */ +for (i = 0; i parmsarray-nelts; ++i) +{ + if (!strncmp(varname, Rivet_StringToUtf(parms[i].key, TCLWEBPOOL), strlen(varname))) + { + /* The following makes sure that we get one string, +with no sub lists. */ + if (result == NULL) + { + result = STRING_TO_UTF_TO_OBJ(parms[i].val, TCLWEBPOOL); + Tcl_IncrRefCount(result); + } else { + Tcl_Obj *tmpobjv[2]; + tmpobjv[0] = result; + tmpobjv[1] = STRING_TO_UTF_TO_OBJ(parms[i].val, TCLWEBPOOL); + result = Tcl_ConcatObj(2, tmpobjv
cvs commit: tcl-rivet/src TclWeb.h TclWebapache.c TclWebcgi.c rivetCore.c
davidw 02/01/18 12:07:18 Modified:.ChangeLog doc commands.html src TclWeb.h TclWebapache.c TclWebcgi.c rivetCore.c Log: * src/rivetCore.c (Rivet_LoadAuth): New command to load authorization information in its own array. Revision ChangesPath 1.19 +15 -0 tcl-rivet/ChangeLog Index: ChangeLog === RCS file: /home/cvs/tcl-rivet/ChangeLog,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ChangeLog 12 Jan 2002 01:05:48 - 1.18 +++ ChangeLog 18 Jan 2002 20:07:18 - 1.19 @@ -1,3 +1,18 @@ +2002-01-18 David N. Welton [EMAIL PROTECTED] + + * src/rivetCore.c (Rivet_LoadAuth): New command to load + authorization information in its own array. + + * src/TclWebcgi.c: New file for stand-alone implementations of + common web API. + + * src/TclWebapache.c: New file for apache-based implementations of + web API. + + * src/TclWeb.c: Common code for TclWeb API. + + * src/TclWeb.h: TclWeb web interaction API. + 2002-01-11 Damon J. Courtney [EMAIL PROTECTED] * src/make.tcl 1.7 +10 -1 tcl-rivet/doc/commands.html Index: commands.html === RCS file: /home/cvs/tcl-rivet/doc/commands.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- commands.html 6 Jan 2002 19:27:01 - 1.6 +++ commands.html 18 Jan 2002 20:07:18 - 1.7 @@ -1,5 +1,5 @@ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN -!-- $Id: commands.html,v 1.6 2002/01/06 19:27:01 davidw Exp $ -- +!-- $Id: commands.html,v 1.7 2002/01/18 20:07:18 davidw Exp $ -- html head titleApache Rivet Tcl Commands/title @@ -83,11 +83,20 @@ li codebload_env iarray_name/i/b/codebr Load the array of environment variables into the specified array name. + Uses array codeenv/code by default. + /li + + li + codebload_auth iarray_name/i/b/codebr Load the + authorization information (codeuser/code and + codepass/code) into the specified array name. Uses + array codeauth/code by default. /li li codebload_cookies iarray_name/i/b/codebr Load the array of cookie variables into the specified array name. + Uses array codecookies/code by default. /li li 1.2 +1 -1 tcl-rivet/src/TclWeb.h Index: TclWeb.h === RCS file: /home/cvs/tcl-rivet/src/TclWeb.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TclWeb.h 18 Jan 2002 19:08:53 - 1.1 +++ TclWeb.h 18 Jan 2002 20:07:18 - 1.2 @@ -70,7 +70,7 @@ int TclWeb_GetCGIVars(Tcl_Obj *list, TclWebRequest *req); -int TclWeb_GetEnvVars(Tcl_Obj *list, TclWebRequest *req); +int TclWeb_GetEnvVars(Tcl_HashTable *envs, TclWebRequest *req); /* upload stuff goes here */ 1.2 +137 -3tcl-rivet/src/TclWebapache.c Index: TclWebapache.c === RCS file: /home/cvs/tcl-rivet/src/TclWebapache.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TclWebapache.c18 Jan 2002 19:08:53 - 1.1 +++ TclWebapache.c18 Jan 2002 20:07:18 - 1.2 @@ -7,12 +7,13 @@ * operations. */ -/* $Id: TclWebapache.c,v 1.1 2002/01/18 19:08:53 davidw Exp $ */ +/* $Id: TclWebapache.c,v 1.2 2002/01/18 20:07:18 davidw Exp $ */ #include tcl.h #include TclWeb.h typedef struct _TclWebRequest { +Tcl_Interp *interp; request_rec *req; ApacheRequest *apachereq; } TclWebRequest; @@ -50,11 +51,144 @@ int TclWeb_GetCGIVars(Tcl_Obj *list, TclWebRequest *req) { - + } int -TclWeb_GetEnvVars(Tcl_Obj *list, TclWebRequest *req); +TclWeb_GetEnvVars(Tcl_HashTable *envs, TclWebRequest *req) +{ +char *timefmt = DEFAULT_TIME_FORMAT; +#ifndef WIN32 +struct passwd *pw; +#endif /* ndef WIN32 */ +char *t; +char *authorization = NULL; + +time_t date; + +int i; + +array_header *hdrs_arr; +table_entry *hdrs; +array_header *env_arr; +table_entry *env; +Tcl_HashEntry *entry; + +date = req-req-request_time; +/* ensure that the system area which holds the cgi variables is empty */ +ap_clear_table(req-req-subprocess_env); + +/* retrieve cgi variables */ +ap_add_cgi_vars(req-req); +ap_add_common_vars(req-req); + +hdrs_arr = ap_table_elts(req-req-headers_in); +hdrs = (table_entry *) hdrs_arr-elts
cvs commit: tcl-rivet ChangeLog
davidw 02/01/09 17:05:01 Modified:.ChangeLog Log: Revision ChangesPath 1.16 +7 -1 tcl-rivet/ChangeLog Index: ChangeLog === RCS file: /home/cvs/tcl-rivet/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ChangeLog 9 Jan 2002 21:48:22 - 1.15 +++ ChangeLog 10 Jan 2002 01:05:01 - 1.16 @@ -1,3 +1,9 @@ +2002-01-10 David N. Welton [EMAIL PROTECTED] + + * tests/template.conf.tcl: Re-add srm.conf and access.conf - if + they aren't present, it tries to grab the ones from /etc/ - not + what we want. + 2002-01-09 Damon J. Courtney [EMAIL PROTECTED] * src/tcl_commands.c Renamed to rivetCore.c @@ -17,7 +23,7 @@ * src/make.tcl Added rivetCore.c, rivetList.c and rivetInit.c to the make. - + 2002-01-08 Damon J. Courtney [EMAIL PROTECTED] * src/mod_rivet.h Added RIVET_NEW_CONF macro to create a new rivet_server_conf.
cvs commit: tcl-rivet/src channel.c channel.h mod_rivet.c mod_rivet.h tcl_commands.c testing.c
davidw 02/01/06 16:11:03 Modified:src channel.c channel.h mod_rivet.c mod_rivet.h tcl_commands.c testing.c Log: * General: Renamed some more commands so that Rivet may be run alongside mod_dtcl. Revision ChangesPath 1.6 +1 -1 tcl-rivet/src/channel.c Index: channel.c === RCS file: /home/cvs/tcl-rivet/src/channel.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- channel.c 5 Jan 2002 14:40:22 - 1.5 +++ channel.c 7 Jan 2002 00:11:03 - 1.6 @@ -60,7 +60,7 @@ return TCL_ERROR; } -Tcl_ChannelType ApacheChan = { +Tcl_ChannelType RivetChan = { apache_channel, NULL, closeproc, 1.2 +1 -1 tcl-rivet/src/channel.h Index: channel.h === RCS file: /home/cvs/tcl-rivet/src/channel.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- channel.h 19 Sep 2001 13:12:58 - 1.1 +++ channel.h 7 Jan 2002 00:11:03 - 1.2 @@ -10,5 +10,5 @@ extern void watchproc(ClientData, int); extern int gethandleproc(ClientData, int, ClientData *); -extern Tcl_ChannelType ApacheChan; +extern Tcl_ChannelType RivetChan; 1.17 +5 -5 tcl-rivet/src/mod_rivet.c Index: mod_rivet.c === RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- mod_rivet.c 6 Jan 2002 23:41:10 - 1.16 +++ mod_rivet.c 7 Jan 2002 00:11:03 - 1.17 @@ -55,7 +55,7 @@ * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. */ -/* $Id: mod_rivet.c,v 1.16 2002/01/06 23:41:10 davidw Exp $ */ +/* $Id: mod_rivet.c,v 1.17 2002/01/07 00:11:03 davidw Exp $ */ /* mod_rivet.c by David Welton [EMAIL PROTECTED] *and Damon Courtney [EMAIL PROTECTED] @@ -158,7 +158,7 @@ /* Function to convert strings to UTF encoding */ char * -StringToUtf(char *input, ap_pool *pool) +Rivet_StringToUtf(char *input, ap_pool *pool) { char *temp; Tcl_DString dstr; @@ -341,7 +341,7 @@ /* This is a seperate function so that it may be called from 'Parse' */ int -get_parse_exec_file(request_rec *r, rivet_server_conf *rsc, +Rivet_ParseExecFile(request_rec *r, rivet_server_conf *rsc, char *filename, int toplevel) { char *hashKey = NULL; @@ -585,7 +585,7 @@ } #endif /* USE_ONLY_UPLOAD_COMMAND == 1 */ -get_parse_exec_file(r, rsc, r-filename, 1); +Rivet_ParseExecFile(r, rsc, r-filename, 1); /* reset globals */ *(rsc-headers_printed) = 0; *(rsc-headers_set) = 0; @@ -609,7 +609,7 @@ rsc-server_interp = interp; /* root interpreter */ /* Create TCL commands to deal with Apache's BUFFs. */ -*(rsc-outchannel) = Tcl_CreateChannel(ApacheChan, apacheout, rsc, +*(rsc-outchannel) = Tcl_CreateChannel(RivetChan, apacheout, rsc, TCL_WRITABLE); Tcl_SetStdChannel(*(rsc-outchannel), TCL_STDOUT); 1.9 +3 -3 tcl-rivet/src/mod_rivet.h Index: mod_rivet.h === RCS file: /home/cvs/tcl-rivet/src/mod_rivet.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_rivet.h 5 Jan 2002 14:40:22 - 1.8 +++ mod_rivet.h 7 Jan 2002 00:11:03 - 1.9 @@ -80,15 +80,15 @@ ApacheRequest *req; /* libapreq request */ } rivet_interp_globals; -int get_parse_exec_file(request_rec *r, rivet_server_conf *rsc, char *filename, int toplevel); +int Rivet_ParseExecFile(request_rec *r, rivet_server_conf *rsc, char *filename, int toplevel); int Rivet_SetHeaderType(request_rec *, char *); int Rivet_PrintHeaders(request_rec *); int Rivet_PrintError(request_rec *, int, char *); -char *StringToUtf(char *input, ap_pool *pool); +char *Rivet_StringToUtf(char *input, ap_pool *pool); rivet_server_conf *Rivet_GetConf(request_rec *r); /* Macro to Tcl Objectify StringToUtf stuff */ -#define STRING_TO_UTF_TO_OBJ(string, pool) Tcl_NewStringObj(StringToUtf(string, pool), -1) +#define STRING_TO_UTF_TO_OBJ(string, pool) Tcl_NewStringObj(Rivet_StringToUtf(string, pool), -1) #define RIVET_SERVER_CONF(module) (rivet_server_conf *)ap_get_module_config(module, rivet_module) 1.15 +10 -10tcl-rivet/src/tcl_commands.c Index: tcl_commands.c === RCS file: /home/cvs/tcl-rivet
cvs commit: tcl-rivet/tests channel.rvt cookies.rvt env.rvt get.rvt hello.rvt post.rvt cookies.test env.test get.test hello.test post.test runtests.tcl template.conf.tcl channel.ttml cookies.ttml env.ttml get.ttml hello.ttml post.ttml
davidw 02/01/06 05:30:54 Modified:.ChangeLog doc commands.html directives.html example.tcl install.html other.html src mod_rivet.c testing.c testscookies.test env.test get.test hello.test post.test runtests.tcl template.conf.tcl Added: .LICENSE README doc examples.rvt testschannel.rvt cookies.rvt env.rvt get.rvt hello.rvt post.rvt Removed: doc examples.ttml testschannel.ttml cookies.ttml env.ttml get.ttml hello.ttml post.ttml Log: * General: Changed .ttml to .rvt. Also changed mime type to x-httpd-rivet. Changed all references in documentation to .rvt from .ttml. Revision ChangesPath 1.10 +7 -1 tcl-rivet/ChangeLog Index: ChangeLog === RCS file: /home/cvs/tcl-rivet/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ChangeLog 5 Jan 2002 14:40:22 - 1.9 +++ ChangeLog 6 Jan 2002 13:30:54 - 1.10 @@ -1,3 +1,9 @@ +2002-01-06 David N. Welton [EMAIL PROTECTED] + + * General: Changed .ttml to .rvt. Also changed mime type to + x-httpd-rivet. Changed all references in documentation to .rvt + from .ttml. + 2002-01-05 David N. Welton [EMAIL PROTECTED] * src/parser.c (Rivet_Parser): A few, mostly cosmetic, cleanups in @@ -8,7 +14,7 @@ * src/channel.c (outputproc): Change printheaders to Rivet_PrintHeaders. - * General whitespace cleanups. + * General: whitespace cleanups. 2001-11-21 David N. Welton [EMAIL PROTECTED] 1.1 tcl-rivet/LICENSE Index: LICENSE === /* * The Apache Software License, Version 1.1 * * Copyright (c) 2000, 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgment: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgment may appear in the software itself, *if and wherever such third-party acknowledgments normally appear. * * 4. The names Apache and Apache Software Foundation must *not be used to endorse or promote products derived from this *software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called mod_rivet *or rivet, nor may rivet appear in their name, without prior *written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. */ 1.1 tcl-rivet/README Index: README === Apache Rivet See LICENSE for licensing terms
cvs commit: tcl-rivet/tests tclconf.tcl tclfile.tcl
davidw 01/11/21 09:57:31 Added: teststclconf.tcl tclfile.tcl Log: Added two I missed on the first commit. Revision ChangesPath 1.1 tcl-rivet/tests/tclconf.tcl Index: tclconf.tcl === # fake tcl 'config' file puts stderr [info script] puts stderr [pwd] 1.1 tcl-rivet/tests/tclfile.tcl Index: tclfile.tcl === # test file for plain .tcl files puts ¡ À È Ì Ò Ù - El Burro Sabe Más Que Tú!
cvs commit: tcl-rivet/tests rivet1-test.ttml rivet2-test.tcl
davidw 01/11/21 09:59:08 Removed: testsrivet1-test.ttml rivet2-test.tcl Log: Removed old test files.
cvs commit: tcl-rivet ChangeLog
davidw 01/11/21 10:39:23 Modified:.ChangeLog Log: Forgot to do my changelog... Revision ChangesPath 1.8 +8 -0 tcl-rivet/ChangeLog Index: ChangeLog === RCS file: /home/cvs/tcl-rivet/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ChangeLog 2001/11/21 18:19:06 1.7 +++ ChangeLog 2001/11/21 18:39:23 1.8 @@ -1,3 +1,11 @@ +2001-11-21 David N. Welton [EMAIL PROTECTED] + + * src/channel.c: Almost all output is based on the ApacheChan + channel, and uses Tcl's buffering, flushing, etc... + + * tests/rivet.test: Updated testing scheme to work with lots of + test files/ttml files. + 2001-11-21 Damon J. Courtney [EMAIL PROTECTED] * src/mod_rivet.c