test186 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. <data>
  11. HTTP/1.1 200 OK swsclose
  12. Date: Tue, 09 Nov 2010 14:49:00 GMT
  13. Server: test-server/fake
  14. Content-Length: 11
  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 with types on text fields
  28. </name>
  29. <command>
  30. http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "name=daniel;type=moo/foo" -F "html= <body>hello</body>;type=text/html;charset=verymoo"
  31. </command>
  32. # We create this file before the command is invoked!
  33. </client>
  34. # Verify data after the test has been "shot"
  35. <verify>
  36. <strip>
  37. ^(Content-Type: multipart/form-data;|------------).*
  38. </strip>
  39. <protocol>
  40. POST /we/want/%TESTNUMBER HTTP/1.1
  41. Host: %HOSTIP:%HTTPPORT
  42. User-Agent: curl/%VERSION
  43. Accept: */*
  44. Content-Length: 338
  45. Content-Type: multipart/form-data; boundary=----------------------------212d9006ceb5
  46. ------------------------------212d9006ceb5
  47. Content-Disposition: form-data; name="name"
  48. Content-Type: moo/foo
  49. daniel
  50. ------------------------------212d9006ceb5
  51. Content-Disposition: form-data; name="html"
  52. Content-Type: text/html;charset=verymoo
  53. <body>hello</body>
  54. ------------------------------212d9006ceb5--
  55. </protocol>
  56. </verify>
  57. </testcase>