test24 779 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 404 BAD BOY
  13. Content-Type: text/html
  14. This silly page doesn't reaaaaaly exist so you should not get it.
  15. </data>
  16. </reply>
  17. # Client-side
  18. <client>
  19. <server>
  20. http
  21. </server>
  22. <name>
  23. HTTP GET fail silently on HTTP error return
  24. </name>
  25. <command>
  26. http://%HOSTIP:%HTTPPORT/%TESTNUMBER --fail --silent --show-error
  27. </command>
  28. </client>
  29. # Verify data after the test has been "shot"
  30. <verify>
  31. <protocol>
  32. GET /%TESTNUMBER HTTP/1.1
  33. Host: %HOSTIP:%HTTPPORT
  34. User-Agent: curl/%VERSION
  35. Accept: */*
  36. </protocol>
  37. <errorcode>
  38. 22
  39. </errorcode>
  40. <file2 name="%LOGDIR/stderr%TESTNUMBER" mode="text">
  41. curl: (22) The requested URL returned error: 404
  42. </file2>
  43. </verify>
  44. </testcase>