test1051 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP PUT
  6. followlocation
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 301 Redirect swsclose
  13. Date: Thu, 29 Jul 2008 14:49:00 GMT
  14. Server: test-server/fake
  15. Location: data/10510002.txt?coolsite=yes
  16. Content-Length: 0
  17. Connection: close
  18. </data>
  19. <data2>
  20. HTTP/1.1 100 Continue
  21. HTTP/1.1 200 Followed here fine swsclose
  22. Date: Thu, 29 Jul 2008 14:49:00 GMT
  23. Server: test-server/fake
  24. Content-Length: 51
  25. If this is received, the location following worked
  26. </data2>
  27. <datacheck>
  28. HTTP/1.1 301 Redirect swsclose
  29. Date: Thu, 29 Jul 2008 14:49:00 GMT
  30. Server: test-server/fake
  31. Location: data/10510002.txt?coolsite=yes
  32. Content-Length: 0
  33. Connection: close
  34. HTTP/1.1 100 Continue
  35. HTTP/1.1 200 Followed here fine swsclose
  36. Date: Thu, 29 Jul 2008 14:49:00 GMT
  37. Server: test-server/fake
  38. Content-Length: 51
  39. If this is received, the location following worked
  40. </datacheck>
  41. </reply>
  42. # Client-side
  43. <client>
  44. <server>
  45. http
  46. </server>
  47. <name>
  48. HTTP PUT with Location: following
  49. </name>
  50. <command>
  51. http://%HOSTIP:%HTTPPORT/want/1051 -L -T log/test1051.txt
  52. </command>
  53. <file name="log/test1051.txt">
  54. Weird
  55. file
  56. to
  57. upload
  58. for
  59. testing
  60. the
  61. PUT
  62. feature
  63. </file>
  64. </client>
  65. # Verify data after the test has been "shot"
  66. <verify>
  67. <strip>
  68. ^User-Agent:.*
  69. </strip>
  70. # The primary reason libcurl sends the data part twice in this test is that
  71. # the test HTTP server is blocking until it has read the entire request,
  72. # including the full request-body before it responds. So in this test the
  73. # server says 301 and 100 _after_ the entire PUT body has been sent.
  74. <protocol>
  75. PUT /want/1051 HTTP/1.1
  76. Host: %HOSTIP:%HTTPPORT
  77. Accept: */*
  78. Content-Length: 78
  79. Expect: 100-continue
  80. Weird
  81. file
  82. to
  83. upload
  84. for
  85. testing
  86. the
  87. PUT
  88. feature
  89. PUT /want/data/10510002.txt?coolsite=yes HTTP/1.1
  90. Host: %HOSTIP:%HTTPPORT
  91. Accept: */*
  92. Content-Length: 78
  93. Expect: 100-continue
  94. Weird
  95. file
  96. to
  97. upload
  98. for
  99. testing
  100. the
  101. PUT
  102. feature
  103. </protocol>
  104. </verify>
  105. </testcase>