test1633 1.5 KB

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