test186 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <testcase>
  2. # Server-side
  3. <reply>
  4. <data>
  5. HTTP/1.1 200 OK swsclose
  6. Date: Thu, 09 Nov 2010 14:49:00 GMT
  7. Server: test-server/fake
  8. Content-Length: 11
  9. blablabla
  10. </data>
  11. </reply>
  12. # Client-side
  13. <client>
  14. <server>
  15. http
  16. </server>
  17. <name>
  18. HTTP RFC1867-type formposting with types on text fields
  19. </name>
  20. <command>
  21. http://%HOSTIP:%HTTPPORT/we/want/186 -F "name=daniel;type=moo/foo" -F "html= <body>hello</body>;type=text/html;charset=verymoo"
  22. </command>
  23. # We create this file before the command is invoked!
  24. </client>
  25. # Verify data after the test has been "shot"
  26. <verify>
  27. <strip>
  28. ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
  29. </strip>
  30. <protocol>
  31. POST /we/want/186 HTTP/1.1
  32. User-Agent: curl/7.12.2-CVS (i686-pc-linux-gnu) libcurl/7.12.2-CVS OpenSSL/0.9.7d zlib/1.2.1.1 c-ares/1.2.0 libidn/0.5.2
  33. Host: %HOSTIP:%HTTPPORT
  34. Accept: */*
  35. Content-Length: 321
  36. Expect: 100-continue
  37. Content-Type: multipart/form-data; boundary=----------------------------212d9006ceb5
  38. ------------------------------212d9006ceb5
  39. Content-Disposition: form-data; name="name"
  40. Content-Type: moo/foo
  41. daniel
  42. ------------------------------212d9006ceb5
  43. Content-Disposition: form-data; name="html"
  44. Content-Type: text/html;charset=verymoo
  45. <body>hello</body>
  46. ------------------------------212d9006ceb5--
  47. </protocol>
  48. </verify>
  49. </testcase>