Article delegate-en/475 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A471@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: A functionnality of delegate ?
19 May 1999 16:01:14 GMT ysato@etl.go.jp (Yutaka Sato)


On 05/19/99(23:56) you "Techadmin" <px4aqbdyi-fjxi26avzhtr.ml@ml.delegate.org> wrote
in <_A471@delegate-en.ML_>
 |For People interested in this kind of filtering,
 |put "#!cfi" instead of "#!/bin/sh" in the script, it will work much better
 |:)

That's right, and I think the content of script was something confused.
Also "CGI:" should be used instead of "Filter:" to return "403" as a
status code of HTTP.  It should have been like this:

#!cfi
Content-Type: text/html
CGI:
  TMP=/tmp/dg-cfi.$$;
  cat > $TMP;
  grep -l "XXXXXX" $TMP > /dev/null;
  if [ $? = 0 ]; then
    echo "Status: 403";
    echo "";
    echo "Forbidden by DeleGate.";
  else
    echo "";
    cat $TMP;
  fi;
  rm $TMP


(Replace "XXXXXX" with an appropriate string.)

Cheers,
Yutaka
--
Yutaka Sato <ysato@etl.go.jp> http://www.etl.go.jp/~ysato/   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V