xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | HTTP Basic auth |
| 7 | --anyauth |
| 8 | </keywords> |
| 9 | </info> |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | HTTP/1.1 401 Authorization Required swsbounce
|
| 14 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 15 | WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun fun"
|
| 16 | Content-Type: text/html; charset=iso-8859-1
|
| 17 | Content-Length: 26
|
| 18 |
|
| 19 | This is not the real page |
| 20 | </data> |
| 21 | |
| 22 | # This is supposed to be returned when the server gets the second request |
| 23 | <data1> |
| 24 | HTTP/1.1 200 OK
|
| 25 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 26 | Content-Type: text/html; charset=iso-8859-1
|
| 27 | Content-Length: 23
|
| 28 |
|
| 29 | This IS the real page! |
| 30 | </data1> |
| 31 | |
| 32 | <datacheck> |
| 33 | HTTP/1.1 401 Authorization Required swsbounce
|
| 34 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 35 | WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun fun"
|
| 36 | Content-Type: text/html; charset=iso-8859-1
|
| 37 | Content-Length: 26
|
| 38 |
|
| 39 | HTTP/1.1 200 OK
|
| 40 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 41 | Content-Type: text/html; charset=iso-8859-1
|
| 42 | Content-Length: 23
|
| 43 |
|
| 44 | This IS the real page! |
| 45 | </datacheck> |
| 46 | |
| 47 | </reply> |
| 48 | |
| 49 | # Client-side |
| 50 | <client> |
| 51 | <server> |
| 52 | http |
| 53 | </server> |
| 54 | <name> |
| 55 | HTTP with WWW-Authenticate and multiple auths in a single line |
| 56 | </name> |
| 57 | <command> |
| 58 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth |
| 59 | </command> |
| 60 | </client> |
| 61 | |
| 62 | # Verify data after the test has been "shot" |
| 63 | <verify> |
| 64 | <protocol> |
| 65 | GET /%TESTNUMBER HTTP/1.1
|
| 66 | Host: %HOSTIP:%HTTPPORT
|
| 67 | User-Agent: curl/%VERSION
|
| 68 | Accept: */*
|
| 69 |
|
| 70 | GET /%TESTNUMBER HTTP/1.1
|
| 71 | Host: %HOSTIP:%HTTPPORT
|
| 72 | Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
|
| 73 | User-Agent: curl/%VERSION
|
| 74 | Accept: */*
|
| 75 |
|
| 76 | </protocol> |
| 77 | </verify> |
| 78 | </testcase> |