test3101 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP Basic auth
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. <data>
  11. HTTP/1.1 401 Authorization Required swsbounce
  12. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  13. WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  14. WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
  15. Content-Length: 26
  16. Content-Type: text/html; charset=iso-8859-1
  17. This is not the real page
  18. </data>
  19. # This is supposed to be returned when the server gets a
  20. # Authorization: Digest line passed-in from the client
  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. Connection: close
  27. This IS the real page!
  28. </data1>
  29. <datacheck>
  30. HTTP/1.1 401 Authorization Required swsbounce
  31. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  32. WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  33. WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
  34. Content-Length: 26
  35. Content-Type: text/html; charset=iso-8859-1
  36. HTTP/1.1 200 OK
  37. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  38. Content-Type: text/html; charset=iso-8859-1
  39. Content-Length: 23
  40. Connection: close
  41. This IS the real page!
  42. </datacheck>
  43. </reply>
  44. # Client-Side
  45. <client>
  46. # require https because the code sets that as an acceptable redirect proto
  47. <features>
  48. https
  49. </features>
  50. <server>
  51. http
  52. </server>
  53. <tool>
  54. lib%TESTNUMBER
  55. </tool>
  56. <name>
  57. HTTP auth without redirection protocols
  58. </name>
  59. <command>
  60. http://%HOSTIP:%HTTPPORT/%TESTNUMBER
  61. </command>
  62. </client>
  63. # Verify data after the test has been "shot"
  64. <verify>
  65. <protocol>
  66. GET /%TESTNUMBER HTTP/1.1
  67. Host: %HOSTIP:%HTTPPORT
  68. Accept: */*
  69. GET /%TESTNUMBER HTTP/1.1
  70. Host: %HOSTIP:%HTTPPORT
  71. Authorization: Basic dXNlcjpwYXNzd29yZA==
  72. Accept: */*
  73. </protocol>
  74. </verify>
  75. </testcase>