#!/bin/sh

set -eu

REQUIRED_CMDLINE="-c examples/authentication.conf"
. regression.inc

HOST="secure.example.com"
WPATH="/"

NAME="check Unauthorized"
CODE=401
do_request

NAME="check ${WPATH}"
CODE=200
do_request "$AUTH"

WPATH="/../etc/passwd"
NAME="check ${WPATH}"
CODE=404
do_request "$AUTH"

echo "All tests passed"
