#!/bin/csh -f

setenv HD /data/globec
set POSTSTR="`$HD/htmlbin/bin/poststring formula`"

set tmp=$PATH_INFO
setenv OBJ $tmp:r
setenv EXT $tmp:e
setenv FULLOBJ $OBJ
setenv QS ""
unsetenv PATH_INFO

if ( "$QUERY_STRING" != "" ) then
  setenv QS `$HD/htmlbin/bin/htmlesc "$QUERY_STRING"`
  setenv FULLOBJ "$OBJ($QS)"
endif

echo "Content-type:text/html"
echo ""

$HD/bin/transfer "http://globec.whoi.edu/jg/serv/mathmethod.${EXT}?${FULLOBJ},$POSTSTR"

