nforth/cgi.f

29 lines
413 B
Forth

0 VAR TLSHASH
0 VAR QUERY
: crap {
dup 12 +
dup @
begin
ENVHASH
$40B37439 case ( over TLSHASH ! )
$B00047B5 case ( over QUERY ! )
drop drop
4 +
dup @
dup while
drop
; }
( " 20 text/gemini" type $0D emit $0A emit )
crap
." TLS: " TLSHASH @ ( dup if dup strlen type else drop thanx cr )
." QUERY: " QUERY @ ( dup if ( strlen type ) else ( drop ) thanx cr )
0 bye