test25 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. followlocation
  7. --max-redirs
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 301 This is a weirdo text message
  14. Server: test-server/fake
  15. Location: data/reply/%TESTNUMBER
  16. Content-Length: 32
  17. Connection: close
  18. Redirect to the same URL again!
  19. </data>
  20. <datacheck>
  21. HTTP/1.1 301 This is a weirdo text message
  22. Server: test-server/fake
  23. Location: data/reply/%TESTNUMBER
  24. Content-Length: 32
  25. Connection: close
  26. HTTP/1.1 301 This is a weirdo text message
  27. Server: test-server/fake
  28. Location: data/reply/%TESTNUMBER
  29. Content-Length: 32
  30. Connection: close
  31. HTTP/1.1 301 This is a weirdo text message
  32. Server: test-server/fake
  33. Location: data/reply/%TESTNUMBER
  34. Content-Length: 32
  35. Connection: close
  36. HTTP/1.1 301 This is a weirdo text message
  37. Server: test-server/fake
  38. Location: data/reply/%TESTNUMBER
  39. Content-Length: 32
  40. Connection: close
  41. HTTP/1.1 301 This is a weirdo text message
  42. Server: test-server/fake
  43. Location: data/reply/%TESTNUMBER
  44. Content-Length: 32
  45. Connection: close
  46. HTTP/1.1 301 This is a weirdo text message
  47. Server: test-server/fake
  48. Location: data/reply/%TESTNUMBER
  49. Content-Length: 32
  50. Connection: close
  51. </datacheck>
  52. </reply>
  53. # Client-side
  54. <client>
  55. <server>
  56. http
  57. </server>
  58. <name>
  59. looping HTTP Location: following with --max-redirs
  60. </name>
  61. <command>
  62. http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L --max-redirs 5
  63. </command>
  64. </client>
  65. # Verify data after the test has been "shot"
  66. <verify>
  67. <protocol>
  68. GET /want/%TESTNUMBER HTTP/1.1
  69. Host: %HOSTIP:%HTTPPORT
  70. User-Agent: curl/%VERSION
  71. Accept: */*
  72. GET /want/data/reply/%TESTNUMBER HTTP/1.1
  73. Host: %HOSTIP:%HTTPPORT
  74. User-Agent: curl/%VERSION
  75. Accept: */*
  76. GET /want/data/reply/data/reply/%TESTNUMBER HTTP/1.1
  77. Host: %HOSTIP:%HTTPPORT
  78. User-Agent: curl/%VERSION
  79. Accept: */*
  80. GET /want/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
  81. Host: %HOSTIP:%HTTPPORT
  82. User-Agent: curl/%VERSION
  83. Accept: */*
  84. GET /want/data/reply/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
  85. Host: %HOSTIP:%HTTPPORT
  86. User-Agent: curl/%VERSION
  87. Accept: */*
  88. GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
  89. Host: %HOSTIP:%HTTPPORT
  90. User-Agent: curl/%VERSION
  91. Accept: */*
  92. </protocol>
  93. <errorcode>
  94. 47
  95. </errorcode>
  96. </verify>
  97. </testcase>