mirror of
https://github.com/moparisthebest/curl
synced 2024-11-05 00:55:04 -05:00
e6b21d422e
... so that we can check HTTP requests for User-Agent: curl/%VERSION Update 600+ test cases accordingly. Closes #6037
116 lines
2.9 KiB
Plaintext
116 lines
2.9 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP POST
|
|
HTTP NTLM auth
|
|
</keywords>
|
|
</info>
|
|
# Server-side
|
|
<reply>
|
|
|
|
<data>
|
|
HTTP/1.1 200 Thanks for this! swsclose
|
|
Content-Length: 25
|
|
|
|
This is the final page !
|
|
</data>
|
|
|
|
<data1001>
|
|
HTTP/1.1 401 Now gimme that second request of crap
|
|
Server: Microsoft-IIS/5.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
Content-Length: 34
|
|
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
|
|
|
This is not the real page either!
|
|
</data1001>
|
|
|
|
# This is supposed to be returned when the server gets the second
|
|
# Authorization: NTLM line passed-in from the client
|
|
<data1002>
|
|
HTTP/1.1 302 Thanks for this, but we want to redir you!
|
|
Server: Microsoft-IIS/5.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
Location: /1100
|
|
Content-Length: 34
|
|
|
|
This is not the real page either!
|
|
</data1002>
|
|
|
|
<datacheck>
|
|
HTTP/1.1 401 Now gimme that second request of crap
|
|
Server: Microsoft-IIS/5.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
Content-Length: 34
|
|
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
|
|
|
HTTP/1.1 302 Thanks for this, but we want to redir you!
|
|
Server: Microsoft-IIS/5.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
Location: /1100
|
|
Content-Length: 34
|
|
|
|
HTTP/1.1 200 Thanks for this! swsclose
|
|
Content-Length: 25
|
|
|
|
This is the final page !
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<features>
|
|
NTLM
|
|
SSL
|
|
!SSPI
|
|
debug
|
|
</features>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
HTTP POST with NTLM authorization and following a 302 redirect
|
|
</name>
|
|
<setenv>
|
|
# we force our own host name, in order to make the test machine independent
|
|
CURL_GETHOSTNAME=curlhost
|
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
|
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
|
|
</setenv>
|
|
<command>
|
|
http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away"
|
|
</command>
|
|
<precheck>
|
|
chkhostname curlhost
|
|
</precheck>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
POST /1100 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Content-Length: 0
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
POST /1100 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Content-Length: 18
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
stuff to send awayGET /1100 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|