[gforth] / gforth / httpd.fs  

gforth: gforth/httpd.fs

Diff for /gforth/httpd.fs between version 1.8 and 1.9

version 1.8, Sun Oct 29 20:27:02 2000 UTC version 1.9, Sun Nov 19 21:42:05 2000 UTC
Line 205 
Line 205 
   
 \ http server                                          26mar00py  \ http server                                          26mar00py
   
   Defer redirect?  ( addr u -- addr' u' t / f )
   Defer redirect ( addr u -- )
   :noname 2drop false ; IS redirect?
   
 : http ( -- )  get-input  IF  .nok  ELSE  : http ( -- )  get-input  IF  .nok  ELSE
     IF  url $@ 1 /string rework-htmldir      IF  url $@ 1 /string 2dup redirect? IF  redirect 2drop  ELSE
           rework-htmldir
         dup 0< IF  drop .nofile          dup 0< IF  drop .nofile
         ELSE  .ok  2dup >mime mime search-wordlist          ELSE  .ok  2dup >mime mime search-wordlist
             0= IF  ['] txt  THEN  catch IF  maxnum off THEN              0= IF  ['] txt  THEN  catch IF  maxnum off THEN
         THEN  THEN  THEN  outfile-id flush-file throw ;          THEN  THEN  THEN  THEN  outfile-id flush-file throw ;
   
 : httpd  ( n -- )  maxnum !  : httpd  ( n -- )  maxnum !
   BEGIN  ['] http catch  maxnum @ 0= or  UNTIL ;    BEGIN  ['] http catch  maxnum @ 0= or  UNTIL ;
Line 224 
Line 229 
         type cr refill  0= UNTIL  EXIT  THEN          type cr refill  0= UNTIL  EXIT  THEN
     nip source >in @ /string rot - dup 2 + >in +! type ;      nip source >in @ /string rot - dup 2 + >in +! type ;
 : <HTML> ( -- )  ." <HTML>" $> ;  : <HTML> ( -- )  ." <HTML>" $> ;
   
   \ provide transparent proxying
   
   include proxy.fs


Generate output suitable for use with a patch program
Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help