===================================================================
RCS file: /home/cvs/OpenXM/src/kan96xx/Doc/httpd.sm1,v
retrieving revision 1.4
retrieving revision 1.15
diff -u -p -r1.4 -r1.15
--- OpenXM/src/kan96xx/Doc/httpd.sm1 2001/08/29 11:18:57 1.4
+++ OpenXM/src/kan96xx/Doc/httpd.sm1 2002/11/10 07:00:03 1.15
@@ -1,11 +1,22 @@
-%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.3 2001/08/23 02:08:41 takayama Exp $
+%% $OpenXM: OpenXM/src/kan96xx/Doc/httpdsm1,v 1.14 2002/11/09 12:42:25 takayama Exp $
%% common modules for httpd on sm1.
/Oxserver_history_variable (Oxserver_history_variable_) def
/httpd.image.type
[(getenv) (OpenXM_PSTOIMG_TYPE)] extension
def
+[(getenv) (OXWEB_DEBUG)] extension tag 0 eq {
+ /httpd.debug 0 def
+} {
+ /httpd.debug 1 def
+} ifelse
+[(getenv) (OXWEB_TAKE_LOG)] extension tag 0 eq {
+ /httpd.take.log 0 def
+} {
+ /httpd.take.log 1 def
+} ifelse
+
/httpd_startserver {
[(sm1.socket) (open) [httpd.port (localhost)]] extension
/httpd.server.fdAndPort set
@@ -27,7 +38,7 @@ def
/sendln {
/arg1 set
- [/in-sendln /mmm] pushVariables
+ [/in-sendln /mmm /i] pushVariables
[ arg1 /mmm set
mmm tag 5 eq {
[mmm 10 (string) dc] cat /mmm set
@@ -37,7 +48,8 @@ def
[(sm1.socket) (select) [httpd.server.fd 0 get 0]] extension {
(Warning (sendln): your peer closed the connection. Do not send the data.) message
} {
- [(sm1.socket) (write) [httpd.server.fd 0 get mmm]] extension message
+ [(sm1.socket) (write) [httpd.server.fd 0 get mmm]] extension /i set
+ httpd.debug { i message } { } ifelse
} ifelse
] pop
popVariables
@@ -70,11 +82,13 @@ def
/httpd.serial 0 def
/httpd.history [ ] def
/httpd.result.history [ 0 ] def
+ [(nobody)] extension pop
{
httpd_startserver ;
httpd_action ;
httpd_stopserver ;
- (5 sleep) system
+ httpd.take.log { (date) system } { } ifelse
+% (sleep 2) system
httpd.serial 1 add /httpd.serial set
} loop
} def
@@ -93,7 +107,7 @@ def
0 sendln
() sendln
(Shutdown the engine.
) sendln
- (See you! Web/sm1 ) sendln
+ (See you! Web/asir, Web/sm1 ) sendln
() sendln
0 sendln
[(flush)] extension
@@ -127,7 +141,11 @@ def
%%( ) sendln %%test. It does not work always?!
%%( Pretty format ) sendln %%test. It works.
- (