]> git.ipfire.org Git - thirdparty/squid.git/blob - test-suite/run_negotiate_test.sh
SourceFormat Enforcement
[thirdparty/squid.git] / test-suite / run_negotiate_test.sh
1 #!/bin/sh
2 #
3 ## Copyright (C) 1996-2016 The Squid Software Foundation and contributors
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
10 url=$1
11 proxy=${2:-localhost}
12 port=${3:-3128}
13
14 if [ $# -lt 1 ]; then
15 echo "Usage: $0 URL [server port]"
16 exit 1
17 fi
18
19 echo "blob # partial message"
20 echo "SLEEP=.. # Delay. Can be combined with the others by using ;"
21 echo "USER=... # Success"
22 echo "BAD.. # Helper failure"
23 echo "ERR.. # Login Failure"
24
25 while read auth; do
26 echo "GET $url HTTP/1.0"
27 if [ -n "$auth" ]; then
28 echo "Proxy-Authorization: Negotiate $auth"
29 fi
30 echo "Proxy-Connection: keep-alive"
31 echo
32 done | tee -a /dev/fd/2 | nc localhost 3128