test152 916 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. --fail
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data nocheck="yes">
  12. HTTP/1.0 401 BAD BOY
  13. Server: swsclose
  14. Content-Type: text/html
  15. This contains a response code >= 400, so curl shouldn't display this. Even
  16. though it's a response code that triggers authentication, we're not using
  17. authentication so we should still fail.
  18. </data>
  19. </reply>
  20. # Client-side
  21. <client>
  22. <server>
  23. http
  24. </server>
  25. <name>
  26. HTTP GET with an error code that might trick authentication and --fail
  27. </name>
  28. <command>
  29. http://%HOSTIP:%HTTPPORT/152 --fail
  30. </command>
  31. </client>
  32. # Verify data after the test has been "shot"
  33. <verify>
  34. <strip>
  35. ^User-Agent: curl/.*
  36. </strip>
  37. <protocol>
  38. GET /152 HTTP/1.1
  39. User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
  40. Host: %HOSTIP:%HTTPPORT
  41. Accept: */*
  42. </protocol>
  43. <errorcode>
  44. 22
  45. </errorcode>
  46. </verify>
  47. </testcase>