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