test1344 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. </keywords>
  7. </info>
  8. #
  9. <reply>
  10. <data nocheck="yes">
  11. HTTP/1.1 200 OK
  12. Date: Thu, 09 Nov 2010 14:49:00 GMT
  13. Server: test-server/fake
  14. Content-Length: 6
  15. Connection: close
  16. Content-Type: text/html
  17. Content-Disposition: filename=name1344; charset=funny; option=strange
  18. 12345
  19. </data>
  20. </reply>
  21. #
  22. # Client-side
  23. <client>
  24. # this relies on the debug feature to allow us to set directory to store the
  25. # -O output in, using the CURL_TESTDIR variable
  26. <features>
  27. debug
  28. </features>
  29. <server>
  30. http
  31. </server>
  32. <name>
  33. HTTP GET with -O -i and Content-Disposition, -D file
  34. </name>
  35. <setenv>
  36. CURL_TESTDIR=%PWD/log
  37. </setenv>
  38. <command option="no-output,no-include">
  39. http://%HOSTIP:%HTTPPORT/1344 -i -O -D log/heads1344
  40. </command>
  41. <postcheck>
  42. perl %SRCDIR/libtest/notexists.pl log/name1344
  43. </postcheck>
  44. </client>
  45. #
  46. # Verify data after the test has been "shot"
  47. <verify>
  48. <strip>
  49. ^User-Agent:.*
  50. </strip>
  51. <protocol>
  52. GET /1344 HTTP/1.1
  53. Host: %HOSTIP:%HTTPPORT
  54. Accept: */*
  55. </protocol>
  56. <file1 name="log/1344">
  57. HTTP/1.1 200 OK
  58. Date: Thu, 09 Nov 2010 14:49:00 GMT
  59. Server: test-server/fake
  60. Content-Length: 6
  61. Connection: close
  62. Content-Type: text/html
  63. Content-Disposition: filename=name1344; charset=funny; option=strange
  64. 12345
  65. </file1>
  66. <file2 name="log/heads1344">
  67. HTTP/1.1 200 OK
  68. Date: Thu, 09 Nov 2010 14:49:00 GMT
  69. Server: test-server/fake
  70. Content-Length: 6
  71. Connection: close
  72. Content-Type: text/html
  73. Content-Disposition: filename=name1344; charset=funny; option=strange
  74. </file2>
  75. <file3 name="log/stdout1344">
  76. </file3>
  77. </verify>
  78. </testcase>