You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2002/02/01 19:59:21 UTC
cvs commit: tcl-rivet/src TclWebapache.c mod_rivet.c rivetCore.c
davidw 02/02/01 10:59:20
Modified: . ChangeLog TODO
doc commands.html help.html
src TclWebapache.c mod_rivet.c rivetCore.c
Log:
* src/rivetCore.c: Deleted rivet_info command.
* src/TclWebapache.c (TclWeb_GetEnvVars): Added RIVET_CACHE_FREE # and
RIVET_CACHE_SIZE as environmental variables.
Revision Changes Path
1.31 +11 -0 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- ChangeLog 28 Jan 2002 21:38:16 -0000 1.30
+++ ChangeLog 1 Feb 2002 18:59:20 -0000 1.31
@@ -1,3 +1,14 @@
+2002-02-01 David N. Welton <da...@dedasys.com>
+
+ * src/rivetCore.c: Deleted rivet_info command.
+
+ * src/TclWebapache.c (TclWeb_GetEnvVars): Added RIVET_CACHE_FREE
+ # and RIVET_CACHE_SIZE as environmental variables.
+
+2002-01-29 David N. Welton <da...@dedasys.com>
+
+ * doc/help.html: Updated mailing list archive location.
+
2002-01-28 David N. Welton <da...@dedasys.com>
* src/rivetCore.c (Rivet_Include): Get channel via Tcl_GetChannel
1.5 +28 -16 tcl-rivet/TODO
Index: TODO
===================================================================
RCS file: /home/cvs/tcl-rivet/TODO,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TODO 19 Jan 2002 23:27:01 -0000 1.4
+++ TODO 1 Feb 2002 18:59:20 -0000 1.5
@@ -1,31 +1,43 @@
-Write commands after like 'open' and such in the request namespace that
-keep track of open file pointers and close them in the cleanup.
+TODO
+====
-Complete the NWS package.
+* Write commands after like 'open' and such in the request namespace
+ that keep track of open file pointers and close them in the cleanup.
-Swipe include_* from NWS and rework it like:
- include ?-virtual? ?-noparse? file
+* Complete the NWS package.
-Add a '-virtual' option to include and parse. This will include or parse
-a file based on the server root.
+* Swipe include_* from NWS and rework it like: include ?-virtual?
+ ?-noparse? file
-Re-write load_file. This basically loads an entire .tcl file into the
-current document instead of sourcing it. This will allow us to cache
-even pages which only source a huge .tcl file. load_virtual should do the
-same but relative to the document root.
+* Add a '-virtual' option to include and parse. This will include or
+ parse a file based on the server root.
-Create escape_string and unescape_string using Apache conventions.
+* Re-write load_file. This basically loads an entire .tcl file into
+ the current document instead of sourcing it. This will allow us to
+ cache even pages which only source a huge .tcl file. load_virtual
+ should do the same but relative to the document root.
-Add a PackageRequire Server directive that will load packages on start-up.
+* Create escape_string and unescape_string using Apache conventions.
+
+* Add a PackageRequire Server directive that will load packages on
+ start-up.
+
+* Free all Rivet commands of apache dependencies, which are moved into
+ the TclWebapache.c file. Compatible file, for CGI only operating,
+ TclWebcgi.c needs to be created.
MAYBE
+=====
-Maybe write load_cookies in Tcl and try to get rid of the apache_cookie.* stuff.
+* Maybe write load_cookies in Tcl and try to get rid of the
+ apache_cookie.* stuff.
-Maybe write the header command in Tcl.
+* Maybe write the header command in Tcl.
+ - basic API is in C... difficult to do.
-Maybe move ::request commands into a file called request.tcl.
+* Maybe move ::request commands into a file called request.tcl.
DONE
+====
\ No newline at end of file
1.9 +1 -9 tcl-rivet/doc/commands.html
Index: commands.html
===================================================================
RCS file: /home/cvs/tcl-rivet/doc/commands.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- commands.html 19 Jan 2002 12:53:56 -0000 1.8
+++ commands.html 1 Feb 2002 18:59:20 -0000 1.9
@@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <!-- $Id: commands.html,v 1.8 2002/01/19 12:53:56 davidw Exp $ -->
+ <!-- $Id: commands.html,v 1.9 2002/02/01 18:59:20 davidw Exp $ -->
<html>
<head>
<title>Apache Rivet Tcl Commands</title>
@@ -146,14 +146,6 @@
Create a self referencing URL from a filename. For example:
<code>makeurl /tclp.gif</code> returns
http://[hostname]:[port]/tclp.gif.
- </li>
-
- <li>
- <code><b>rivet_info</b></code><br>
-
- Prints information on the internals of the module in
- HTML. Currently, only the PID and size of the object
- cache are reported.
</li>
<!--
<li>
1.4 +2 -3 tcl-rivet/doc/help.html
Index: help.html
===================================================================
RCS file: /home/cvs/tcl-rivet/doc/help.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- help.html 6 Jan 2002 19:27:01 -0000 1.3
+++ help.html 1 Feb 2002 18:59:20 -0000 1.4
@@ -22,11 +22,10 @@
href="mailto:rivet-dev-subscribe@tcl.apache.org">rivet-dev-subscribe@tcl.apache.org</a>.</p>
</p>
<p>
- Currently, lists are not archived. If you'd like to help
- out, let us know.
+ The mailing list is archived at <a href="http://www.apachelabs.org">www.apachelabs.org</a>.
</p>
</li>
</ul>
</body>
</html>
- <!-- $Id: help.html,v 1.3 2002/01/06 19:27:01 davidw Exp $ -->
\ No newline at end of file
+ <!-- $Id: help.html,v 1.4 2002/02/01 18:59:20 davidw Exp $ -->
\ No newline at end of file
1.9 +12 -1 tcl-rivet/src/TclWebapache.c
Index: TclWebapache.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/TclWebapache.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- TclWebapache.c 27 Jan 2002 15:43:43 -0000 1.8
+++ TclWebapache.c 1 Feb 2002 18:59:20 -0000 1.9
@@ -7,14 +7,16 @@
* operations.
*/
-/* $Id: TclWebapache.c,v 1.8 2002/01/27 15:43:43 davidw Exp $ */
+/* $Id: TclWebapache.c,v 1.9 2002/02/01 18:59:20 davidw Exp $ */
#include <tcl.h>
#include "apache_request.h"
#include "apache_cookie.h"
+#include "mod_rivet.h"
#include "TclWeb.h"
+extern module rivet_module;
#define TCLWEBPOOL req->req->pool
int
@@ -284,6 +286,7 @@
table_entry *hdrs;
array_header *env_arr;
table_entry *env;
+ rivet_server_conf *rsc = NULL;
date = req->req->request_time;
/* ensure that the system area which holds the cgi variables is empty */
@@ -299,6 +302,8 @@
env_arr = ap_table_elts(req->req->subprocess_env);
env = (table_entry *) env_arr->elts;
+ rsc = RIVET_SERVER_CONF( req->req->server->module_config );
+
/* These were the "include vars" */
Tcl_ObjSetVar2(req->interp, envvar, Tcl_NewStringObj("DATE_LOCAL", -1),
TclWeb_StringToUtfToObj(ap_ht_time(TCLWEBPOOL, date, timefmt, 0), req), 0);
@@ -366,6 +371,12 @@
Tcl_ObjSetVar2(req->interp, envvar, TclWeb_StringToUtfToObj(env[i].key, req),
TclWeb_StringToUtfToObj(env[i].val, req), 0);
}
+
+ /* Here we create some variables with Rivet internal information. */
+ Tcl_ObjSetVar2(req->interp, envvar, Tcl_NewStringObj("RIVET_CACHE_FREE", -1),
+ Tcl_NewIntObj(*(rsc->cache_free)), 0);
+ Tcl_ObjSetVar2(req->interp, envvar, Tcl_NewStringObj("RIVET_CACHE_SIZE", -1),
+ Tcl_NewIntObj(*(rsc->cache_size)), 0);
/* cleanup system cgi variables */
ap_clear_table(req->req->subprocess_env);
1.29 +2 -2 tcl-rivet/src/mod_rivet.c
Index: mod_rivet.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- mod_rivet.c 27 Jan 2002 16:10:22 -0000 1.28
+++ mod_rivet.c 1 Feb 2002 18:59:20 -0000 1.29
@@ -55,7 +55,7 @@
* originally written at the National Center for Supercomputing Applications,
* University of Illinois, Urbana-Champaign. */
-/* $Id: mod_rivet.c,v 1.28 2002/01/27 16:10:22 davidw Exp $ */
+/* $Id: mod_rivet.c,v 1.29 2002/02/01 18:59:20 davidw Exp $ */
/* mod_rivet.c by David Welton <da...@apache.org>
* and Damon Courtney <da...@unreality.com>
@@ -485,7 +485,7 @@
/* Create TCL commands to deal with Apache's BUFFs. */
*(rsc->outchannel) = Tcl_CreateChannel(&RivetChan, "apacheout", rsc,
- TCL_WRITABLE);
+ TCL_WRITABLE);
Tcl_SetStdChannel(*(rsc->outchannel), TCL_STDOUT);
Tcl_SetChannelOption(interp, *(rsc->outchannel), "-buffersize", "1000000");
1.13 +2 -35 tcl-rivet/src/rivetCore.c
Index: rivetCore.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/rivetCore.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- rivetCore.c 28 Jan 2002 21:38:16 -0000 1.12
+++ rivetCore.c 1 Feb 2002 18:59:20 -0000 1.13
@@ -2,7 +2,7 @@
* rivetCore.c - Core commands which are compiled into mod_rivet itself.
*/
-/* $Id: rivetCore.c,v 1.12 2002/01/28 21:38:16 davidw Exp $ */
+/* $Id: rivetCore.c,v 1.13 2002/02/01 18:59:20 davidw Exp $ */
#include "httpd.h"
#include "http_config.h"
@@ -542,7 +542,7 @@
Tcl_ReadChars(chan, result, ApacheUpload_size(upload), 0);
} else {
Tcl_AppendResult(interp,
- "Rivet_UploadFilesToVar is not set", NULL);
+ "RivetServerConf UploadFilesToVar is not set", NULL);
return TCL_ERROR;
}
}
@@ -610,34 +610,6 @@
return TCL_OK;
}
-
-/* Tcl command to get, and print some information about the current
- state of affairs */
-
-static int
-Rivet_Info(
- ClientData clientData,
- Tcl_Interp *interp,
- int objc,
- Tcl_Obj *CONST objv[])
-{
- char *tble;
- rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL);
- rivet_server_conf *rsc =
- RIVET_SERVER_CONF( globals->r->server->module_config );
-
- tble = ap_psprintf(POOL,
- "<table border=0 bgcolor=green><tr><td>\n"
- "<table border=0 bgcolor=\"#000000\">\n"
- "<tr><td align=center bgcolor=blue><font color=\"#ffffff\" size=\"+2\">rivet_info</font><br></td></tr>\n"
- "<tr><td><font color=\"#ffffff\">Free cache size: %d</font><br></td></tr>\n"
- "<tr><td><font color=\"#ffffff\">PID: %d</font><br></td></tr>\n"
- "</table>\n"
- "</td></tr></table>\n", *(rsc->cache_free), getpid());
- Tcl_WriteObj(*(rsc->outchannel), Tcl_NewStringObj(tble, -1));
- return TCL_OK;
-}
-
/* Tcl command to erase body, so that only header is returned.
Necessary for 304 responses */
@@ -718,11 +690,6 @@
Tcl_CreateObjCommand(interp,
"parse",
Rivet_Parse,
- NULL,
- (Tcl_CmdDeleteProc *)NULL);
- Tcl_CreateObjCommand(interp,
- "rivet_info",
- Rivet_Info,
NULL,
(Tcl_CmdDeleteProc *)NULL);
Tcl_CreateObjCommand(interp,
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org