test1533 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. CURLOPT_KEEP_SENDING_ON_ERROR
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <servercmd>
  12. auth_required
  13. </servercmd>
  14. <data nocheck="yes">
  15. HTTP/1.1 401 Authorization Required
  16. Date: Thu, 09 Nov 2010 14:49:00 GMT
  17. Server: test-server/fake
  18. Content-Length: 15
  19. Early Response
  20. </data>
  21. </reply>
  22. # Client-side
  23. <client>
  24. <server>
  25. http
  26. </server>
  27. <tool>
  28. lib1533
  29. </tool>
  30. <name>
  31. HTTP with CURLOPT_KEEP_SENDING_ON_ERROR and an early error response
  32. </name>
  33. <command>
  34. http://%HOSTIP:%HTTPPORT/1533
  35. </command>
  36. </client>
  37. # Verify data after the test has been "shot"
  38. # TEST_ERR_SUCCESS is errorcode 120
  39. <verify>
  40. <errorcode>
  41. 120
  42. </errorcode>
  43. <protocol nonewline="yes">
  44. POST /1533 HTTP/1.1
  45. Host: %HOSTIP:%HTTPPORT
  46. Accept: */*
  47. Content-Length: 3
  48. Content-Type: application/x-www-form-urlencoded
  49. POST /1533 HTTP/1.1
  50. Host: %HOSTIP:%HTTPPORT
  51. Accept: */*
  52. Content-Length: 3
  53. Content-Type: application/x-www-form-urlencoded
  54. POST /1533 HTTP/1.1
  55. Host: %HOSTIP:%HTTPPORT
  56. Accept: */*
  57. Content-Length: 3
  58. Content-Type: application/x-www-form-urlencoded
  59. aaaPOST /1533 HTTP/1.1
  60. Host: %HOSTIP:%HTTPPORT
  61. Accept: */*
  62. Content-Length: 3
  63. Content-Type: application/x-www-form-urlencoded
  64. aaa
  65. </protocol>
  66. </verify>
  67. </testcase>