<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
HTTP GET
HTTP proxy
HTTP proxy Digest auth
</keywords>
</info>

# Server-side
<reply>
<data1 crlf="headers">
HTTP/1.1 200 OK
Content-Length: 12
Connection: close

proxied one
</data1>

<data2 crlf="headers">
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Digest realm="attacker", nonce="1053604598"
Content-Length: 7
Connection: close

direct
</data2>

<data4 crlf="headers">
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Digest realm="tunnel-attacker", nonce="1053604598"
Content-Length: 9
Connection: close

tunneled
</data4>

<connect>
HTTP/1.1 200 Mighty fine indeed

</connect>

<datacheck>
proxied one
direct
proxied one
tunneled
proxied one
</datacheck>
</reply>

# Client-side
<client>
<server>
http
</server>
<tool>
lib%TESTNUMBER
</tool>
<features>
!SSPI
crypto
proxy
digest
</features>
<name>
HTTP 407 from a non-proxied host must not set proxy Digest state
</name>
<command>
http://test.remote.example.com/%TESTNUMBER0001 %HOSTIP %HTTPPORT %TESTNUMBER
</command>
</client>

# Verify data after the test has been "shot"
<verify>
<protocol crlf="headers">
GET http://test.remote.example.com/%TESTNUMBER0001 HTTP/1.1
Host: test.remote.example.com
Accept: */*
Proxy-Connection: Keep-Alive

GET /%TESTNUMBER0002 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*

GET http://test.remote.example.com/%TESTNUMBER0001 HTTP/1.1
Host: test.remote.example.com
Accept: */*
Proxy-Connection: Keep-Alive

CONNECT test.remote.example.com:%HTTPPORT HTTP/1.1
Host: test.remote.example.com:%HTTPPORT
Proxy-Connection: Keep-Alive

GET /%TESTNUMBER0004 HTTP/1.1
Host: test.remote.example.com:%HTTPPORT
Accept: */*

GET http://test.remote.example.com/%TESTNUMBER0001 HTTP/1.1
Host: test.remote.example.com
Accept: */*
Proxy-Connection: Keep-Alive

</protocol>
</verify>
</testcase>
