test71 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 and -F upload in config file
  17. </name>
  18. <stdin>
  19. -F name=daniel
  20. -F tool=curl
  21. -F file=@log/test71.txt
  22. </stdin>
  23. <command>
  24. http://%HOSTIP:%HOSTPORT/we/want/71 -K -
  25. </command>
  26. # We create this file before the command is invoked!
  27. <file name="log/test71.txt">
  28. foo-
  29. This is a moo-
  30. bar
  31. </file>
  32. </test>
  33. # Verify data after the test has been "shot"
  34. <verify>
  35. <strip>
  36. ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
  37. </strip>
  38. <protocol>
  39. POST /we/want/71 HTTP/1.1
  40. User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  41. Host: 127.0.0.1:8999
  42. Pragma: no-cache
  43. Accept: */*
  44. Content-Length: 412
  45. Expect: 100-continue
  46. Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
  47. ------------------------------9ef8d6205763
  48. Content-Disposition: form-data; name="name"
  49. daniel
  50. ------------------------------9ef8d6205763
  51. Content-Disposition: form-data; name="tool"
  52. curl
  53. ------------------------------9ef8d6205763
  54. Content-Disposition: form-data; name="file"; filename="log/test71.txt"
  55. Content-Type: text/plain
  56. foo-
  57. This is a moo-
  58. bar
  59. ------------------------------9ef8d6205763--
  60. </protocol>
  61. </verify>