test1051 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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/%TESTNUMBER0002.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/%TESTNUMBER0002.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/%TESTNUMBER -L -T log/test%TESTNUMBER.txt
  52. </command>
  53. <file name="log/test%TESTNUMBER.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. # The primary reason libcurl sends the data part twice in this test is that
  68. # the test HTTP server is blocking until it has read the entire request,
  69. # including the full request-body before it responds. So in this test the
  70. # server says 301 and 100 _after_ the entire PUT body has been sent.
  71. <protocol>
  72. PUT /want/%TESTNUMBER HTTP/1.1
  73. Host: %HOSTIP:%HTTPPORT
  74. User-Agent: curl/%VERSION
  75. Accept: */*
  76. Content-Length: 78
  77. Expect: 100-continue
  78. Weird
  79. file
  80. to
  81. upload
  82. for
  83. testing
  84. the
  85. PUT
  86. feature
  87. PUT /want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
  88. Host: %HOSTIP:%HTTPPORT
  89. User-Agent: curl/%VERSION
  90. Accept: */*
  91. Content-Length: 78
  92. Expect: 100-continue
  93. Weird
  94. file
  95. to
  96. upload
  97. for
  98. testing
  99. the
  100. PUT
  101. feature
  102. </protocol>
  103. </verify>
  104. </testcase>