test1633 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 301 OK
  13. Accept-Ranges: bytes
  14. Content-Length: 0
  15. Connection: close
  16. Location: /%TESTNUMBER0002
  17. </data>
  18. <data2>
  19. HTTP/1.1 429 too many requests
  20. Retry-After: 1
  21. Content-Length: 0
  22. Connection: close
  23. </data2>
  24. <datacheck>
  25. HTTP/1.1 301 OK
  26. Accept-Ranges: bytes
  27. Content-Length: 0
  28. Connection: close
  29. Location: /%TESTNUMBER0002
  30. HTTP/1.1 429 too many requests
  31. Retry-After: 1
  32. Content-Length: 0
  33. Connection: close
  34. HTTP/1.1 301 OK
  35. Accept-Ranges: bytes
  36. Content-Length: 0
  37. Connection: close
  38. Location: /%TESTNUMBER0002
  39. HTTP/1.1 429 too many requests
  40. Retry-After: 1
  41. Content-Length: 0
  42. Connection: close
  43. </datacheck>
  44. </reply>
  45. #
  46. # Client-side
  47. <client>
  48. <server>
  49. http
  50. </server>
  51. <name>
  52. --retry with a 429 response and Retry-After:
  53. </name>
  54. <command>
  55. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -d moo --retry 1 -L
  56. </command>
  57. </client>
  58. #
  59. # Verify data after the test has been "shot"
  60. <verify>
  61. <protocol>
  62. POST /%TESTNUMBER HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. Content-Length: 3
  67. Content-Type: application/x-www-form-urlencoded
  68. mooGET /%TESTNUMBER0002 HTTP/1.1
  69. Host: %HOSTIP:%HTTPPORT
  70. User-Agent: curl/%VERSION
  71. Accept: */*
  72. POST /%TESTNUMBER HTTP/1.1
  73. Host: %HOSTIP:%HTTPPORT
  74. User-Agent: curl/%VERSION
  75. Accept: */*
  76. Content-Length: 3
  77. Content-Type: application/x-www-form-urlencoded
  78. mooGET /%TESTNUMBER0002 HTTP/1.1
  79. Host: %HOSTIP:%HTTPPORT
  80. User-Agent: curl/%VERSION
  81. Accept: */*
  82. </protocol>
  83. </verify>
  84. </testcase>