2
0

test1336 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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: Tue, 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=name%TESTNUMBER; 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 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/%TESTNUMBER -O -D log/heads%TESTNUMBER
  40. </command>
  41. <postcheck>
  42. perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
  43. </postcheck>
  44. </client>
  45. #
  46. # Verify data after the test has been "shot"
  47. <verify>
  48. <protocol>
  49. GET /%TESTNUMBER HTTP/1.1
  50. Host: %HOSTIP:%HTTPPORT
  51. User-Agent: curl/%VERSION
  52. Accept: */*
  53. </protocol>
  54. <file1 name="log/%TESTNUMBER">
  55. 12345
  56. </file1>
  57. <file2 name="log/heads%TESTNUMBER">
  58. HTTP/1.1 200 OK
  59. Date: Tue, 09 Nov 2010 14:49:00 GMT
  60. Server: test-server/fake
  61. Content-Length: 6
  62. Connection: close
  63. Content-Type: text/html
  64. Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
  65. </file2>
  66. <file3 name="log/stdout%TESTNUMBER">
  67. </file3>
  68. </verify>
  69. </testcase>