[BACK]Return to httpd-rpc.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Diff for /OpenXM/src/kan96xx/Doc/httpd-rpc.sm1 between version 1.3 and 1.6

version 1.3, 2002/10/24 02:48:59 version 1.6, 2002/10/28 08:57:28
Line 1 
Line 1 
 %% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-rpc.sm1,v 1.2 2002/10/24 02:12:34 takayama Exp $  %% $OpenXM: OpenXM/src/kan96xx/Doc/httpd-rpc.sm1,v 1.5 2002/10/24 07:45:03 takayama Exp $
 %% http server by sm1. Used for RPC.  Generic example.  %% http server by sm1. Used for RPC.  Generic example.
   
 [(parse) (httpd.sm1) pushfile] extension pop  [(parse) (httpd.sm1) pushfile] extension pop
Line 66  oxNoX 
Line 66  oxNoX 
 /httpd_action {  /httpd_action {
   [/in-httpd /ff /httpd.com /httpd.result /sss    [/in-httpd /ff /httpd.com /httpd.result /sss
    /sss.engine /sss.web /err     /sss.engine /sss.web /err
    /oxserver.vname     /oxserver.vname /scheck
   ] pushVariables    ] pushVariables
   [    [
   {    {
Line 88  oxNoX 
Line 88  oxNoX 
           httpd.com metaCommand {            httpd.com metaCommand {
             httpd.textarea.valid {              httpd.textarea.valid {
   
                 %%% Security check
                 [(regionMatches) httpd.com
                  httpd.refusedCommands] extension /scheck set
                 scheck 0 get -1 eq {
                 }{
                   httpd.refusedCommands scheck 2 get get message
                   (Command is refused.) message
                   [
                    httpd.refusedCommands scheck 2 get get
                    httpd.com
                   ]
                    send-page-refused exit
                 } ifelse
   
               %%%  Executing command, here.                %%%  Executing command, here.
               oxasir.ccc                oxasir.ccc
               httpd.com cookedCommand                httpd.com cookedCommand
Line 229  oxNoX 
Line 243  oxNoX 
   popVariables    popVariables
 } def  } def
   
   /send-page-refused {
     /arg1 set
     [/in-send-page-refused /reason] pushVariables
     [
      /reason arg1 def
      (HTTP/0.9 200 OK) sendln
      (Connection: close) sendln
      (Content-Type: text/html) sendln
      0 sendln
   
     (<H2> Your request is refused. </H2> <br> ) sendln
     (Because your input contains the key word <font color="red">) sendln
     reason 0 get sendln
     ( </font> ) sendln
     (<br> <br>) sendln
     (Your input is <br> ) sendln
     (<pre> ) sendln
     reason 1 get sendln
     (</pre> ) sendln
   
      0 sendln
      [(flush)] extension
     ] pop
     popVariables
   } def
   
 %% **** Overwrites the definition in httpd.sm1  %% **** Overwrites the definition in httpd.sm1
 /httpd_startserver {  /httpd_startserver {
    (httpd server accessible outside localhost.) message     (httpd server accessible outside localhost.) message
Line 258  oxNoX 
Line 298  oxNoX 
   popVariables    popVariables
   arg1    arg1
 } def  } def
   /httpd.refusedCommands
      [(shell) (eval_str) (ox_) (sm1_) (m_)
       (connect) (load)  (bload) (bsave)
       (end) (quit) (output) (bload27) (open)
       (plot) (ctrl) (debug) (error) (port) (bind) (accept)
       (draw)  (peek) (poke)
      ]
   def

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>