test25 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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/25
  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/25
  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/25
  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/25
  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/25
  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/25
  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/25
  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/25 -L --max-redirs 5
  63. </command>
  64. </client>
  65. # Verify data after the test has been "shot"
  66. <verify>
  67. <strip>
  68. ^User-Agent: curl/.*
  69. </strip>
  70. <protocol>
  71. GET /want/25 HTTP/1.1
  72. User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
  73. Host: %HOSTIP:%HTTPPORT
  74. Accept: */*
  75. GET /want/data/reply/25 HTTP/1.1
  76. User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
  77. Host: %HOSTIP:%HTTPPORT
  78. Accept: */*
  79. GET /want/data/reply/data/reply/25 HTTP/1.1
  80. User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
  81. Host: %HOSTIP:%HTTPPORT
  82. Accept: */*
  83. GET /want/data/reply/data/reply/data/reply/25 HTTP/1.1
  84. User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
  85. Host: %HOSTIP:%HTTPPORT
  86. Accept: */*
  87. GET /want/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1
  88. User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
  89. Host: %HOSTIP:%HTTPPORT
  90. Accept: */*
  91. GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1
  92. User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
  93. Host: %HOSTIP:%HTTPPORT
  94. Accept: */*
  95. </protocol>
  96. <errorcode>
  97. 47
  98. </errorcode>
  99. </verify>
  100. </testcase>