On Sat, Apr 2, 2016 at 10:10 PM, Sebastian Bazley <s...@apache.org> wrote:
> Commit 5a59778cec543ef7de0f9ea8bd501827836a082c:
>     Initial draft of mirror checking page
>
>
> Branch: refs/heads/master
> Author: Sebb <s...@apache.org>
> Committer: Sebb <s...@apache.org>
> Pusher: sebb <s...@apache.org>
>
> ------------------------------------------------------------
> tools/mirror_check.rb                                        | +++++++++++
> www/members/mirror_check.cgi                                 | +++
> ------------------------------------------------------------
> 344 changes: 344 additions, 0 deletions.
> ------------------------------------------------------------
>
>
> diff --git a/tools/mirror_check.rb b/tools/mirror_check.rb
> new file mode 100755
> index 0000000..5fd443b

[snip]

> +
> +# Are we really running under a shell?
> +if __FILE__ == $0 and ENV['SHELL'] and ! ENV['REQUEST_METHOD']

As an alternative to checking ENV, consider moving the html view code
(_html below and methods like display above) to the cgi.

[snip]

> +print "Status: 200 OK\r\n"

Probably not a good idea; Wunderbar will output a status line if there
is a failure; I'm not sure how CGI servers handle having mutliple
status lines.

- Sam Ruby

Reply via email to