test44 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 without Expect: header
  17. </name>
  18. <command>
  19. http://%HOSTIP:%HOSTPORT/we/want/44 -F name=daniel -F tool=curl -F file=@log/test44.txt -H 'Expect:'
  20. </command>
  21. # We create this file before the command is invoked!
  22. <file name="log/test44.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/44 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: 412
  40. Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
  41. ------------------------------7c633d5c27ce
  42. Content-Disposition: form-data; name="name"
  43. daniel
  44. ------------------------------7c633d5c27ce
  45. Content-Disposition: form-data; name="tool"
  46. curl
  47. ------------------------------7c633d5c27ce
  48. Content-Disposition: form-data; name="file"; filename="log/test44.txt"
  49. Content-Type: text/plain
  50. foo-
  51. This is a moo-
  52. bar
  53. ------------------------------7c633d5c27ce--
  54. </protocol>
  55. </verify>