test44 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP FORMPOST
  6. HTTP replaced headers
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.0 200 OK swsclose
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. blablabla
  16. </data>
  17. </reply>
  18. # Client-side
  19. <client>
  20. <features>
  21. Mime
  22. </features>
  23. <server>
  24. http
  25. </server>
  26. <name>
  27. HTTP RFC1867-type formposting without Expect: header
  28. </name>
  29. <command>
  30. http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@%LOGDIR/test%TESTNUMBER.txt -H "Expect:"
  31. </command>
  32. # We create this file before the command is invoked!
  33. <file name="%LOGDIR/test%TESTNUMBER.txt">
  34. foo-
  35. This is a moo-
  36. bar
  37. </file>
  38. </client>
  39. # Verify data after the test has been "shot"
  40. <verify>
  41. <strip>
  42. ^(Content-Type: multipart/form-data;|------).*
  43. </strip>
  44. <protocol>
  45. POST /we/want/%TESTNUMBER HTTP/1.1
  46. Host: %HOSTIP:%HTTPPORT
  47. User-Agent: curl/%VERSION
  48. Accept: */*
  49. Content-Length: 432
  50. Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
  51. ------------------------------7c633d5c27ce
  52. Content-Disposition: form-data; name="name"
  53. daniel
  54. ------------------------------7c633d5c27ce
  55. Content-Disposition: form-data; name="tool"
  56. curl
  57. ------------------------------7c633d5c27ce
  58. Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
  59. Content-Type: text/plain
  60. foo-
  61. This is a moo-
  62. bar
  63. ------------------------------7c633d5c27ce--
  64. </protocol>
  65. </verify>
  66. </testcase>