test1341 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. -J
  7. </keywords>
  8. </info>
  9. #
  10. <reply>
  11. <data nocheck="yes">
  12. HTTP/1.1 200 OK
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Content-Length: 6
  16. Connection: close
  17. Content-Type: text/html
  18. Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
  19. 12345
  20. </data>
  21. </reply>
  22. #
  23. # Client-side
  24. <client>
  25. # this relies on the debug feature to allow us to set directory to store the
  26. # -O and -J output in, using the CURL_TESTDIR variable
  27. <features>
  28. debug
  29. </features>
  30. <server>
  31. http
  32. </server>
  33. <name>
  34. HTTP GET with -O -J and Content-Disposition, -D stdout
  35. </name>
  36. <setenv>
  37. CURL_TESTDIR=%PWD/%LOGDIR
  38. </setenv>
  39. <command option="no-output,no-include">
  40. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O -D - -w "curl saved to filename %{filename_effective}\n"
  41. </command>
  42. </client>
  43. #
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. <protocol>
  47. GET /%TESTNUMBER HTTP/1.1
  48. Host: %HOSTIP:%HTTPPORT
  49. User-Agent: curl/%VERSION
  50. Accept: */*
  51. </protocol>
  52. <file1 name="%LOGDIR/name%TESTNUMBER">
  53. 12345
  54. </file1>
  55. <file2 name="%LOGDIR/stdout%TESTNUMBER">
  56. HTTP/1.1 200 OK
  57. Date: Tue, 09 Nov 2010 14:49:00 GMT
  58. Server: test-server/fake
  59. Content-Length: 6
  60. Connection: close
  61. Content-Type: text/html
  62. Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
  63. curl saved to filename %PWD/%LOGDIR/name%TESTNUMBER
  64. </file2>
  65. </verify>
  66. </testcase>