Return to test155 CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data |
1.1 ! misho 1: <testcase> ! 2: <info> ! 3: <keywords> ! 4: HTTP ! 5: HTTP PUT ! 6: HTTP NTLM auth ! 7: </keywords> ! 8: </info> ! 9: ! 10: # Server-side ! 11: <reply> ! 12: <servercmd> ! 13: auth_required ! 14: </servercmd> ! 15: <data> ! 16: HTTP/1.1 401 NTLM Authorization Required swsclose ! 17: Server: Apache/1.3.27 (Darwin) PHP/4.1.2 ! 18: WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" ! 19: WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" ! 20: WWW-Authenticate: NTLM ! 21: Content-Type: text/html; charset=iso-8859-1 ! 22: Connection: close ! 23: ! 24: moo ! 25: </data> ! 26: ! 27: # This is supposed to be returned when the server gets a first ! 28: # Authorization: NTLM line passed-in from the client ! 29: <data1001> ! 30: HTTP/1.1 401 Type-1 received, send back type-2 ! 31: Server: Microsoft-IIS/5.0 ! 32: Content-Length: 34 ! 33: Content-Type: text/html; charset=iso-8859-1 ! 34: WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== ! 35: ! 36: This is not the real page either! ! 37: </data1001> ! 38: ! 39: # This is supposed to be returned when the server gets the second ! 40: # Authorization: NTLM line passed-in from the client ! 41: <data1002> ! 42: HTTP/1.1 200 Type-3 Received and all Things are fine swsclose ! 43: Server: Microsoft-IIS/5.0 ! 44: Content-Type: text/html; charset=iso-8859-1 ! 45: Content-Length: 32 ! 46: ! 47: Finally, this is the real page! ! 48: </data1002> ! 49: ! 50: <datacheck> ! 51: HTTP/1.1 401 NTLM Authorization Required swsclose ! 52: Server: Apache/1.3.27 (Darwin) PHP/4.1.2 ! 53: WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" ! 54: WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" ! 55: WWW-Authenticate: NTLM ! 56: Content-Type: text/html; charset=iso-8859-1 ! 57: Connection: close ! 58: ! 59: HTTP/1.1 401 Type-1 received, send back type-2 ! 60: Server: Microsoft-IIS/5.0 ! 61: Content-Length: 34 ! 62: Content-Type: text/html; charset=iso-8859-1 ! 63: WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== ! 64: ! 65: HTTP/1.1 200 Type-3 Received and all Things are fine swsclose ! 66: Server: Microsoft-IIS/5.0 ! 67: Content-Type: text/html; charset=iso-8859-1 ! 68: Content-Length: 32 ! 69: ! 70: Finally, this is the real page! ! 71: </datacheck> ! 72: ! 73: </reply> ! 74: ! 75: # Client-side ! 76: <client> ! 77: <features> ! 78: NTLM ! 79: SSL ! 80: !SSPI ! 81: debug ! 82: </features> ! 83: <server> ! 84: http ! 85: </server> ! 86: <name> ! 87: HTTP PUT with --anyauth authorization (picking NTLM) ! 88: </name> ! 89: <setenv> ! 90: # we force our own host name, in order to make the test machine independent ! 91: CURL_GETHOSTNAME=curlhost ! 92: # we try to use the LD_PRELOAD hack, if not a debug build ! 93: LD_PRELOAD=%PWD/libtest/.libs/libhostname.so ! 94: </setenv> ! 95: <command> ! 96: http://%HOSTIP:%HTTPPORT/155 -T log/put155 -u testuser:testpass --anyauth ! 97: </command> ! 98: <precheck> ! 99: chkhostname curlhost ! 100: </precheck> ! 101: <file name="log/put155"> ! 102: This is data we upload with PUT ! 103: a second line ! 104: line three ! 105: four is the number of lines ! 106: </file> ! 107: </client> ! 108: ! 109: # Verify data after the test has been "shot" ! 110: <verify> ! 111: <strip> ! 112: ^User-Agent:.* ! 113: </strip> ! 114: <protocol> ! 115: PUT /155 HTTP/1.1 ! 116: Host: %HOSTIP:%HTTPPORT ! 117: Accept: */* ! 118: Content-Length: 85 ! 119: Expect: 100-continue ! 120: ! 121: PUT /155 HTTP/1.1 ! 122: Host: %HOSTIP:%HTTPPORT ! 123: Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= ! 124: Accept: */* ! 125: Content-Length: 0 ! 126: ! 127: PUT /155 HTTP/1.1 ! 128: Host: %HOSTIP:%HTTPPORT ! 129: Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= ! 130: User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3 ! 131: Accept: */* ! 132: Content-Length: 85 ! 133: Expect: 100-continue ! 134: ! 135: This is data we upload with PUT ! 136: a second line ! 137: line three ! 138: four is the number of lines ! 139: </protocol> ! 140: </verify> ! 141: </testcase>