Implemented a new command, egw_clear, to clear http output cache.
[egate.git] / www / wtest.c
index c59c79d..a84621f 100644 (file)
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * $Log: wtest.c,v $
- * Revision 1.2  1996/01/09 10:46:51  adam
+ * Revision 1.4  1997/01/27 11:27:18  adam
+ * Implemented a new command, egw_clear, to clear http output cache.
+ * Changed prototype for function wo_clear.
+ *
+ * Revision 1.3  1996/02/12 10:10:33  adam
+ * Resource/config system used by the gateway.
+ *
+ * Revision 1.2  1996/01/09  10:46:51  adam
  * New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile.
  *
  * Revision 1.1  1995/10/20  11:49:28  adam
@@ -64,13 +71,12 @@ int main()
     int counter = 0;
     int i;
 
-    chdir (CGIDIR);
     gw_log_init ("egw");
     gw_log_level (GW_LOG_ALL);
-    gw_log_file (GW_LOG_ALL, LOGDIR "/wtest_log");
+    gw_log_file (GW_LOG_ALL, "wtest_log");
     gw_log (GW_LOG_STAT, mod, "Europagate www test");
 
-    if (!(wcl = wproto_init ()))
+    if (!(wcl = wproto_init ("/tmp/egw", "wtest")))
     {
         gw_log (GW_LOG_FATAL, mod, "init");
         exit (1);
@@ -78,7 +84,8 @@ int main()
     while (wproto_process(wcl, timeout) > 0)
     {
         gw_log (GW_LOG_DEBUG, mod, "Process input");
-       wo_clear (wcl, "text/html");
+       wo_clear (wcl);
+        wo_printf (wcl, "Content-type: text/html\n\n");
        wo_printf (wcl, "<HTML><TITLE>Test page</TITLE>\n");
        wo_printf (wcl, "Hello from the test program.<BR>\n");
        wo_printf (wcl, "This is #%d time that you call me!!<BR>\n", ++counter);