test9 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Server-side
  2. <reply>
  3. <data>
  4. HTTP/1.1 200 OK swsclose
  5. Date: Thu, 09 Nov 2010 14:49:00 GMT
  6. Server: test-server/fake
  7. blablabla
  8. </data>
  9. </reply>
  10. # Client-side
  11. <client>
  12. <server>
  13. http
  14. </server>
  15. <name>
  16. HTTP RFC1867-type formposting
  17. </name>
  18. <command>
  19. http://%HOSTIP:%HOSTPORT/we/want/9 -F name=daniel -F tool=curl -F file=@log/test9.txt
  20. </command>
  21. # We create this file before the command is invoked!
  22. <file name="log/test9.txt">
  23. foo-
  24. This is a moo-
  25. bar
  26. </file>
  27. </test>
  28. # Verify data after the test has been "shot"
  29. <verify>
  30. <strip>
  31. ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
  32. </strip>
  33. <protocol>
  34. POST /we/want/9 HTTP/1.1
  35. User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  36. Host: 127.0.0.1:8999
  37. Pragma: no-cache
  38. Accept: */*
  39. Content-Length: 411
  40. Expect: 100-continue
  41. Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
  42. ------------------------------9ef8d6205763
  43. Content-Disposition: form-data; name="name"
  44. daniel
  45. ------------------------------9ef8d6205763
  46. Content-Disposition: form-data; name="tool"
  47. curl
  48. ------------------------------9ef8d6205763
  49. Content-Disposition: form-data; name="file"; filename="log/test9.txt"
  50. Content-Type: text/plain
  51. foo-
  52. This is a moo-
  53. bar
  54. ------------------------------9ef8d6205763--
  55. </protocol>
  56. </verify>