===================================================================
RCS file: /home/cvs/OpenXM/src/kan96xx/Doc/httpd.sm1,v
retrieving revision 1.5
retrieving revision 1.13
diff -u -p -r1.5 -r1.13
--- OpenXM/src/kan96xx/Doc/httpd.sm1 2001/09/20 05:57:40 1.5
+++ OpenXM/src/kan96xx/Doc/httpd.sm1 2002/11/03 12:43:03 1.13
@@ -1,11 +1,22 @@
-%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.4 2001/08/29 11:18:57 takayama Exp $
+%% $OpenXM: OpenXM/src/kan96xx/Doc/httpd.sm1,v 1.12 2002/10/30 13:23:06 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
@@ -74,7 +86,8 @@ def
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 +106,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 +140,11 @@ def
%%( ) sendln %%test. It does not work always?!
%%( Pretty format ) sendln %%test. It works.
- (