test1204 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. This is not the real page
  19. </data>
  20. # This is supposed to be returned when the server gets the second request
  21. <data1>
  22. HTTP/1.1 200 OK
  23. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  24. Content-Type: text/html; charset=iso-8859-1
  25. Content-Length: 23
  26. This IS the real page!
  27. </data1>
  28. <datacheck>
  29. HTTP/1.1 401 Authorization Required swsbounce
  30. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  31. WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun fun"
  32. Content-Type: text/html; charset=iso-8859-1
  33. Content-Length: 26
  34. HTTP/1.1 200 OK
  35. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  36. Content-Type: text/html; charset=iso-8859-1
  37. Content-Length: 23
  38. This IS the real page!
  39. </datacheck>
  40. </reply>
  41. # Client-side
  42. <client>
  43. <server>
  44. http
  45. </server>
  46. <name>
  47. HTTP with WWW-Authenticate and multiple auths in a single line
  48. </name>
  49. <command>
  50. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth
  51. </command>
  52. </client>
  53. # Verify data after the test has been "shot"
  54. <verify>
  55. <protocol>
  56. GET /%TESTNUMBER HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. User-Agent: curl/%VERSION
  59. Accept: */*
  60. GET /%TESTNUMBER HTTP/1.1
  61. Host: %HOSTIP:%HTTPPORT
  62. Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
  63. User-Agent: curl/%VERSION
  64. Accept: */*
  65. </protocol>
  66. </verify>
  67. </testcase>