]> git.ipfire.org Git - thirdparty/squid.git/blame - test-suite/negotiate_test.sh
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / test-suite / negotiate_test.sh
CommitLineData
6bf4f823 1#!/bin/sh
4e0938ef 2#
5b74111a 3## Copyright (C) 1996-2018 The Squid Software Foundation and contributors
4e0938ef
AJ
4##
5## Squid software is distributed under GPLv2+ license and includes
6## contributions from numerous individuals and organizations.
7## Please see the COPYING and CONTRIBUTORS files for details.
8##
9
6bf4f823 10while read request; do
0201179f
HN
11case $request in
12*SLEEP=*)
13 sleep `echo $request | sed -e 's/.*SLEEP=\([^;]*\).*/\1/'`
14 request=`echo $request | sed -e 's/SLEEP=[^;]*;*//'`
15 ;;
16esac
6bf4f823 17data="`echo $request | cut -c4-`"
18blob="$$.$data-$challenge.`date +%s`"
19case $request in
20
21??" USER="*)
22 echo "AF Success-$blob `echo $request|cut -d= -f2-`"
23 ;;
24
25??" BAD"*)
26 echo "BH `echo $request|cut -c7-`"
27 ;;
28
29??" ERR"*)
30 echo "NA Invalid-$blob `echo $request|cut -c7-`"
31 ;;
32
33"YR"*)
34 challenge="$data.`date +%s`"
35 echo "TT Challenge-$$.$challenge *"
36 ;;
37
38"KK"*)
39 echo "TT Negotiate-$$.$data-$challenge.`date +%s` *"
40 ;;
41*)
42 echo "BH Invalid request"
43 ;;
44esac
45done