test1341 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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: Thu, 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=name1341; 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/log
  38. </setenv>
  39. <command option="no-output,no-include">
  40. http://%HOSTIP:%HTTPPORT/1341 -J -O -D -
  41. </command>
  42. </client>
  43. #
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. <strip>
  47. ^User-Agent:.*
  48. </strip>
  49. <protocol>
  50. GET /1341 HTTP/1.1
  51. Host: %HOSTIP:%HTTPPORT
  52. Accept: */*
  53. </protocol>
  54. <file1 name="log/name1341">
  55. 12345
  56. </file1>
  57. <file2 name="log/stdout1341">
  58. HTTP/1.1 200 OK
  59. Date: Thu, 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=name1341; charset=funny; option=strange
  65. curl: Saved to filename '%PWD/log/name1341'
  66. </file2>
  67. </verify>
  68. </testcase>